diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd new file mode 100644 index 0000000..78ecf08 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifdef GL_ES | ||
2 | #ifdef GL_FRAGMENT_PRECISION_HIGH | ||
3 | precision highp float; | ||
4 | #else | ||
5 | precision mediump float; | ||
6 | #endif | ||
7 | #endif | ||
8 | uniform sampler2D tex; | ||
9 | varying vec4 col; | ||
10 | varying vec2 tex_c; | ||
11 | void main() | ||
12 | { | ||
13 | float inten = dot(texture2D(tex,tex_c.xy).agb,vec3(.3, .59, .11)); | ||
14 | gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r) * col; | ||
15 | } | ||