vertex.vs 347 B

12345678910111213141516171819
  1. #version 300 es
  2. precision highp float;
  3. layout (location = 0) in vec2 position;
  4. layout (location = 1) in vec2 tex;
  5. layout (location = 2) in vec4 color;
  6. uniform mat4 view;
  7. uniform mat4 model;
  8. out vec2 varTex;
  9. out vec4 varColor;
  10. void main() {
  11. varTex = tex;
  12. varColor = color;
  13. gl_Position = view * model * vec4(position, 0.0, 1.0);
  14. }