vertex.vs 330 B

123456789101112131415161718
  1. #version 430
  2. layout (location = 0) in vec3 pos;
  3. layout (location = 1) in vec4 color;
  4. layout (location = 2) in vec2 tex;
  5. uniform mat4 projMatrix;
  6. uniform mat4 viewMatrix;
  7. out vec4 outColor;
  8. out vec2 outTex;
  9. void main(void)
  10. {
  11. outTex = tex;
  12. outColor = color;
  13. gl_Position = projMatrix * viewMatrix * vec4(pos, 1.0);
  14. }