Courtney Goeltzenleuchter | 21c58b0 | 2014-10-30 10:07:20 -0600 | [diff] [blame] | 1 | /* |
2 | * Vertex shader used by Cube demo. | ||||
3 | */ | ||||
4 | #version 140 | ||||
5 | #extension GL_ARB_separate_shader_objects : enable | ||||
6 | #extension GL_ARB_shading_language_420pack : enable | ||||
7 | layout(binding = 0) uniform buf { | ||||
8 | mat4 MVP; | ||||
9 | vec4 position[12*3]; | ||||
10 | vec4 attr[12*3]; | ||||
11 | } ubuf; | ||||
12 | |||||
13 | layout (location = 0) out vec4 texcoord; | ||||
14 | void main() | ||||
15 | { | ||||
16 | texcoord = ubuf.attr[gl_VertexID]; | ||||
17 | gl_Position = ubuf.MVP * ubuf.position[gl_VertexID]; | ||||
18 | } |