2016-11-02 14:13:34 +08:00
|
|
|
const char* ccPositionTexture_GrayScale_frag = R"(
|
2014-12-23 15:03:31 +08:00
|
|
|
|
2016-10-26 16:03:08 +08:00
|
|
|
#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);
|
2016-11-02 14:13:34 +08:00
|
|
|
c = v_fragmentColor * c;
|
2016-10-26 16:03:08 +08:00
|
|
|
gl_FragColor.xyz = vec3(0.2126*c.r + 0.7152*c.g + 0.0722*c.b);
|
|
|
|
gl_FragColor.w = c.w;
|
|
|
|
}
|
2016-11-02 14:13:34 +08:00
|
|
|
)";
|