glowMapGeneration.fragment.fx 441 B

12345678910111213141516171819202122232425
  1. #ifdef ALPHATEST
  2. varying vec2 vUVDiffuse;
  3. uniform sampler2D diffuseSampler;
  4. #endif
  5. #ifdef EMISSIVE
  6. varying vec2 vUVEmissive;
  7. uniform sampler2D emissiveSampler;
  8. #endif
  9. uniform vec4 color;
  10. void main(void)
  11. {
  12. #ifdef ALPHATEST
  13. if (texture2D(diffuseSampler, vUVDiffuse).a < 0.4)
  14. discard;
  15. #endif
  16. #ifdef EMISSIVE
  17. gl_FragColor = texture2D(emissiveSampler, vUVEmissive) * color;
  18. #else
  19. gl_FragColor = color;
  20. #endif
  21. }