vert_for_rects.glsl (497B)
1 #version 430 core 2 3 layout(location = 0) in vec2 vertex_position; 4 layout(location = 1) in vec2 vertex_texture_coordinate; 5 layout(location = 2) in vec4 vertex_colour; 6 7 layout(location = 0) out vec2 fragment_texture_coordinate; 8 layout(location = 1) out vec4 fragment_colour; 9 10 layout(location = 0) uniform mat4 u_Pmat; 11 12 void main() 13 { 14 fragment_texture_coordinate = vertex_texture_coordinate; 15 fragment_colour = vertex_colour; 16 17 gl_Position = u_Pmat * vec4(vertex_position, 0.0, 1.0); 18 }