efl/src/modules/evas/engines/gl_common/shader/filter_greyscale.h

16 lines
400 B
C

"#ifdef GL_ES\n"
"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
"precision highp float;\n"
"#else\n"
"precision mediump float;\n"
"#endif\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" float inten = dot(texture2D(tex,tex_c.xy).agb,vec3(.3, .59, .11));\n"
" gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r) * col;\n"
"}\n"