vert.glsl 410 B

12345678910111213141516
  1. #version 450 core
  2. layout (location = 0) in vec4 vertex; // <vec2 position, vec2 texCoords>
  3. uniform mat4 model;
  4. // note that we're omitting the view matrix; the view never changes so we basically have an identity view matrix and can therefore omit it.
  5. uniform mat4 projection;
  6. out vec2 TexCoords;
  7. void main() {
  8. TexCoords = vertex.zw;
  9. gl_Position = projection * model * vec4(vertex.xy, 0.0, 1.0);
  10. }