shaders: Fix the usage of the Cogl GLSL variables

This commit is contained in:
Emmanuele Bassi 2010-11-17 12:47:46 +00:00
parent f96113705d
commit e5da5b0907
3 changed files with 4 additions and 4 deletions

View File

@ -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"

View File

@ -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";

View File

@ -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";