summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2019-11-12 10:07:54 +0900
committerMike Blumenkrantz <zmike@samsung.com>2019-11-27 09:42:53 -0500
commit0ed990076a0edb75d5d337358454197dafb55f3c (patch)
tree5e88aa9ee121846ae771814e8b54f69e4553b2f3
parent60efdb40aa5b22a8fa8b7d470f91248c86eee420 (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
-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 73ca4bef11..9aeb16bfd6 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 "#ifndef SHD_FILTER_BLUR\n" 222 "#ifndef SHD_FILTER_BLUR\n"
221 " gl_FragColor =\n" 223 " gl_FragColor =\n"
diff --git a/src/modules/evas/engines/gl_common/shader/fragment.glsl b/src/modules/evas/engines/gl_common/shader/fragment.glsl
index 39fccf1119..54c04735ca 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#ifndef SHD_FILTER_BLUR 239#ifndef SHD_FILTER_BLUR