summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2019-11-12 10:07:54 +0900
committerShinwoo Kim <cinoo.kim@samsung.com>2019-11-12 10:08:39 +0900
commit97f58949720a6dd2b92b71e89179aaffc00e41bc (patch)
tree19d6c2e76a7488068ca7ecfae3165933dfd9048d /src
parent5b6b1b10ee7ec47503a9e8f256434daf6220792a (diff)
evas_filter: remove shader compile error
Summary: When grayscale fillter works there is a compile error: implicit cast from "float" to "vec3" 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 Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10595
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x4
-rw-r--r--src/modules/evas/engines/gl_common/shader/fragment.glsl4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x b/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x
index e5c16b5..d244b37 100644
--- a/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x
+++ b/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x
@@ -215,7 +215,9 @@ static const char fragment_glsl[] =
215 " c = vec4(c.a, c.a, c.a, c.a);\n" 215 " c = vec4(c.a, c.a, c.a, c.a);\n"
216 "#endif\n" 216 "#endif\n"
217 "#ifdef SHD_FILTER_GRAYSCALE\n" 217 "#ifdef SHD_FILTER_GRAYSCALE\n"
218 " c.rgb = 0.3 * c.r + 0.59 * c.g + 0.11 * c.b;\n" 218 " c.r = 0.3 * c.r + 0.59 * c.g + 0.11 * c.b;\n"
219 " c.g = c.r;\n"
220 " c.b = c.r;\n"
219 "#endif\n" 221 "#endif\n"
220 "#ifdef SHD_FILTER_INVERSE_COLOR\n" 222 "#ifdef SHD_FILTER_INVERSE_COLOR\n"
221 " c.rgb = c.a - c.rgb;\n" 223 " c.rgb = c.a - c.rgb;\n"
diff --git a/src/modules/evas/engines/gl_common/shader/fragment.glsl b/src/modules/evas/engines/gl_common/shader/fragment.glsl
index b51bbb4..0994796 100644
--- a/src/modules/evas/engines/gl_common/shader/fragment.glsl
+++ b/src/modules/evas/engines/gl_common/shader/fragment.glsl
@@ -231,7 +231,9 @@ vec4 fetch_pixel(float ox, float oy)
231#endif 231#endif
232 232
233#ifdef SHD_FILTER_GRAYSCALE 233#ifdef SHD_FILTER_GRAYSCALE
234 c.rgb = 0.3 * c.r + 0.59 * c.g + 0.11 * c.b; 234 c.r = 0.3 * c.r + 0.59 * c.g + 0.11 * c.b;
235 c.g = c.r;
236 c.b = c.r;
235#endif 237#endif
236 238
237#ifdef SHD_FILTER_INVERSE_COLOR 239#ifdef SHD_FILTER_INVERSE_COLOR