sprite.vert 328 B

12345678910111213141516171819
  1. // Attributes
  2. attribute vec3 a_position;
  3. attribute vec2 a_texCoord;
  4. attribute vec4 a_color;
  5. // Uniforms
  6. uniform mat4 u_projectionMatrix;
  7. // Varyings
  8. varying vec2 v_texCoord;
  9. varying vec4 v_color;
  10. void main()
  11. {
  12. gl_Position = u_projectionMatrix * vec4(a_position, 1);
  13. v_texCoord = a_texCoord;
  14. v_color = a_color;
  15. }