blackAndWhite.fragment.fx 275 B

12345678910111213
  1. #ifdef GL_ES
  2. precision highp float;
  3. #endif
  4. // Samplers
  5. varying vec2 vUV;
  6. uniform sampler2D textureSampler;
  7. void main(void)
  8. {
  9. float luminance = dot(texture2D(textureSampler, vUV).rgb, vec3(0.3, 0.59, 0.11));
  10. gl_FragColor = vec4(luminance, luminance, luminance, 1.0);
  11. }