diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd new file mode 100644 index 0000000..caed378 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd | |||
@@ -0,0 +1,20 @@ | |||
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 | vec3 inp = texture2D(tex,tex_c.xy).rgb; | ||
14 | vec4 sep; | ||
15 | sep.r = dot(inp, vec3(.393, .769, .189)); | ||
16 | sep.g = dot(inp, vec3(.349, .686, .168)); | ||
17 | sep.b = dot(inp, vec3(.272, .534, .131)); | ||
18 | sep.a = texture2D(tex,tex_c.xy).a; | ||
19 | gl_FragColor = sep * col; | ||
20 | } | ||