summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_common/shader/fragment.glsl
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2019-11-05 10:44:58 +0900
committerShinwoo Kim <cinoo.kim@samsung.com>2019-11-05 10:45:14 +0900
commit51169ac325c59912417412b9138eeacbbb6a93bc (patch)
tree9066fb83f6e5f0c7bb8871d2e29bb60dda234d7b /src/modules/evas/engines/gl_common/shader/fragment.glsl
parent0e6e9838089ec09321f948f6c46826bd444664e9 (diff)
evas filter: Implement inverse color filter
Summary: This is the first version of inverse color filter both GL and SW. Test Plan: 1. Create filter_example with following . efl_gfx_filter_program_set(image, "inverse_color ()", "inverse color"); 2. Run. ./filter_example (Use ELM_ACCEL=gl for GL engine) Reviewers: Hermet, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10335
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/gl_common/shader/fragment.glsl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/evas/engines/gl_common/shader/fragment.glsl b/src/modules/evas/engines/gl_common/shader/fragment.glsl
index 39fccf1119..b51bbb4d38 100644
--- a/src/modules/evas/engines/gl_common/shader/fragment.glsl
+++ b/src/modules/evas/engines/gl_common/shader/fragment.glsl
@@ -234,6 +234,10 @@ vec4 fetch_pixel(float ox, float oy)
234 c.rgb = 0.3 * c.r + 0.59 * c.g + 0.11 * c.b; 234 c.rgb = 0.3 * c.r + 0.59 * c.g + 0.11 * c.b;
235#endif 235#endif
236 236
237#ifdef SHD_FILTER_INVERSE_COLOR
238 c.rgb = c.a - c.rgba;
239#endif
240
237#ifndef SHD_FILTER_BLUR 241#ifndef SHD_FILTER_BLUR
238 242
239 gl_FragColor = 243 gl_FragColor =