summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_common/shader/fragment.glsl
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2019-09-27 15:30:36 +0900
committerShinwoo Kim <cinoo.kim@samsung.com>2019-09-27 15:35:03 +0900
commit081e318d90646c8b9c4e750c08224223120cb3bc (patch)
tree923dd2780934cb975e1a453a066ebb64a6c4ea4e /src/modules/evas/engines/gl_common/shader/fragment.glsl
parent29beda7f4f365425656e3340ea2da592d00fb52c (diff)
evas filter: Implement grayscale filter in pure GL
Summary: Initial version implementing grayscale filter in pure GL. This patch needs a logt of love as 5bce712 did. Grasyscale formula: https://www.tutorialspoint.com/dip/grayscale_to_rgb_conversion.htm Test Plan: 1. Create filter_example with following . efl_gfx_filter_program_set(image, "grayscale ()", "grayscale"); 2. Run. ELM_ACCEL=gl ./filter_example Reviewers: Hermet, jsuya Subscribers: ali.alzyod, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9858
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 89f306062a..39fccf1119 100644
--- a/src/modules/evas/engines/gl_common/shader/fragment.glsl
+++ b/src/modules/evas/engines/gl_common/shader/fragment.glsl
@@ -230,6 +230,10 @@ vec4 fetch_pixel(float ox, float oy)
230 c = vec4(c.a, c.a, c.a, c.a); 230 c = vec4(c.a, c.a, c.a, c.a);
231#endif 231#endif
232 232
233#ifdef SHD_FILTER_GRAYSCALE
234 c.rgb = 0.3 * c.r + 0.59 * c.g + 0.11 * c.b;
235#endif
236
233#ifndef SHD_FILTER_BLUR 237#ifndef SHD_FILTER_BLUR
234 238
235 gl_FragColor = 239 gl_FragColor =