Blame view

res/shaders/gray.frag 259 Bytes
9f1cb386   dangge   auto package
1
2
3
4
5
6
7
8
9
10
11
12
  #ifdef GL_ES 
  precision mediump float;
  #endif 
  varying vec4 v_fragmentColor; 
  varying vec2 v_texCoord; 
  
  void main(void) 
  { 
      vec4 c = texture2D(CC_Texture0, v_texCoord);
  	gl_FragColor.xyz = vec3(0.299*c.r + 0.587*c.g +0.114*c.b);
  	gl_FragColor.w = c.w; 
  }