darkness_shader.fsh 337 B

1234567891011121314151617
  1. #ifdef GL_ES
  2. precision lowp float;
  3. #endif
  4. varying vec4 v_fragmentColor;
  5. varying vec2 v_texCoord;
  6. void main()
  7. {
  8. vec4 c = texture2D(CC_Texture0, v_texCoord);
  9. float greyNum = 0.45;
  10. vec4 final = c;
  11. final.r = c.r * greyNum;
  12. final.g = c.g * greyNum;
  13. final.b = c.b * greyNum;
  14. gl_FragColor = final;
  15. }