sprite.frag 421 B

12345678910111213141516171819202122
  1. #ifdef OPENGL_ES
  2. #ifdef GL_FRAGMENT_PRECISION_HIGH
  3. precision highp float;
  4. #else
  5. precision mediump float;
  6. #endif
  7. #endif
  8. ///////////////////////////////////////////////////////////
  9. // Uniforms
  10. uniform sampler2D u_texture;
  11. ///////////////////////////////////////////////////////////
  12. // Varyings
  13. varying vec2 v_texCoord;
  14. varying vec4 v_color;
  15. void main()
  16. {
  17. gl_FragColor = v_color * texture2D(u_texture, v_texCoord);
  18. }