Renderer2D.fsh 334 B

1234567891011121314151617181920212223
  1. #version 100
  2. precision mediump float;
  3. /* Uniforms */
  4. uniform int uTextureUsage;
  5. uniform sampler2D uTextureUnit;
  6. /* Varyings */
  7. varying vec2 vTextureCoord;
  8. varying vec4 vVertexColor;
  9. void main()
  10. {
  11. vec4 Color = vVertexColor;
  12. if (bool(uTextureUsage))
  13. Color *= texture2D(uTextureUnit, vTextureCoord);
  14. gl_FragColor = Color;
  15. }