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
This commit is contained in:
Shinwoo Kim 2019-11-12 10:07:54 +09:00
parent 5b6b1b10ee
commit 97f5894972
2 changed files with 6 additions and 2 deletions

View File

@ -215,7 +215,9 @@ static const char fragment_glsl[] =
" c = vec4(c.a, c.a, c.a, c.a);\n"
"#endif\n"
"#ifdef SHD_FILTER_GRAYSCALE\n"
" c.rgb = 0.3 * c.r + 0.59 * c.g + 0.11 * c.b;\n"
" c.r = 0.3 * c.r + 0.59 * c.g + 0.11 * c.b;\n"
" c.g = c.r;\n"
" c.b = c.r;\n"
"#endif\n"
"#ifdef SHD_FILTER_INVERSE_COLOR\n"
" c.rgb = c.a - c.rgb;\n"

View File

@ -231,7 +231,9 @@ vec4 fetch_pixel(float ox, float oy)
#endif
#ifdef SHD_FILTER_GRAYSCALE
c.rgb = 0.3 * c.r + 0.59 * c.g + 0.11 * c.b;
c.r = 0.3 * c.r + 0.59 * c.g + 0.11 * c.b;
c.g = c.r;
c.b = c.r;
#endif
#ifdef SHD_FILTER_INVERSE_COLOR