mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
shaders: Fix the usage of the Cogl GLSL variables
This commit is contained in:
parent
f96113705d
commit
e5da5b0907
@ -62,12 +62,12 @@ static const gchar *box_blur_glsl_shader =
|
||||
"\n"
|
||||
"vec4 get_rgba_rel (sampler2D source, float dx, float dy)\n"
|
||||
"{\n"
|
||||
" return texture2D (tex, cogl_tex_coord[0].st + vec2 (dx, dy) * 2.0);\n"
|
||||
" return texture2D (tex, cogl_tex_coord_in[0].st + vec2 (dx, dy) * 2.0);\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"void main ()\n"
|
||||
"{\n"
|
||||
" vec4 color = cogl_color_in * texture2D (tex, vec2 (cogl_tex_coord[0].xy));\n"
|
||||
" vec4 color = cogl_color_in * texture2D (tex, vec2 (cogl_tex_coord_in[0].xy));\n"
|
||||
" color += get_rgba_rel (tex, -x_step, -y_step);\n"
|
||||
" color += get_rgba_rel (tex, 0.0, -y_step);\n"
|
||||
" color += get_rgba_rel (tex, x_step, -y_step);\n"
|
||||
|
@ -89,7 +89,7 @@ static const gchar *colorize_glsl_shader =
|
||||
"\n"
|
||||
"void main ()\n"
|
||||
"{\n"
|
||||
" vec4 color = cogl_color_in * texture2D (tex, vec2 (cogl_tex_coord[0].xy));\n"
|
||||
" vec4 color = cogl_color_in * texture2D (tex, vec2 (cogl_tex_coord_in[0].xy));\n"
|
||||
" float gray = dot (color.rgb, vec3 (0.299, 0.587, 0.114));\n"
|
||||
" cogl_color_out = vec4 (gray * tint, color.a);\n"
|
||||
"}\n";
|
||||
|
@ -100,7 +100,7 @@ static const gchar *desaturate_glsl_shader =
|
||||
"\n"
|
||||
"void main ()\n"
|
||||
"{\n"
|
||||
" vec4 color = cogl_color_in * texture2D (tex, vec2 (cogl_tex_coord[0].xy));\n"
|
||||
" vec4 color = cogl_color_in * texture2D (tex, vec2 (cogl_tex_coord_in[0].xy));\n"
|
||||
" color.rgb = desaturate (color.rgb, factor);\n"
|
||||
" cogl_color_out = color;\n"
|
||||
"}\n";
|
||||
|
Loading…
Reference in New Issue
Block a user