1 2 3 4 5 6 7 8 9 10 11 12 13 14
#version 330 core layout (location = 0) in vec2 vertex; layout (location = 1) in vec2 texture; // <vec2 pos, vec2 tex> out vec2 _f_texture; uniform mat4 _u_matrix; void main() { _f_texture = texture; gl_Position = _u_matrix * vec4(vertex.xy, 0.0, 1.0); }