aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-04 18:41:13 +1000
committerDavid Walter Seikel2012-01-04 18:41:13 +1000
commitdd7595a3475407a7fa96a97393bae8c5220e8762 (patch)
treee341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd
parentAdd the skeleton. (diff)
downloadSledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd')
-rw-r--r--libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd15
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
3precision highp float;
4#else
5precision mediump float;
6#endif
7#endif
8uniform sampler2D tex;
9varying vec4 col;
10varying vec2 tex_c;
11void 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}