gray.frag.js 451 B

1234567891011121314151617181920
  1. module.exports =
  2. `
  3. #ifdef GL_ES
  4. precision lowp float;
  5. #endif
  6. varying vec4 v_fragmentColor;
  7. varying vec2 v_texCoord;
  8. void main()
  9. {
  10. vec4 c = v_fragmentColor * texture2D(CC_Texture0, v_texCoord);
  11. gl_FragColor.xyz = vec3(0.2126 * c.r + 0.7152 * c.g + 0.0722 * c.b);
  12. gl_FragColor.w = c.w;
  13. }
  14. `
  15. /**
  16. * vec4 c = v_fragmentColor * texture2D(CC_Texture0, v_texCoord);
  17. gl_FragColor = vec4(0.188, 0.478, 0.898, 1);
  18. gl_FragColor.w = c.w;
  19. */