mirror of
https://github.com/brl/mutter.git
synced 2025-01-11 12:12:25 +00:00
effects: Make sure we're using GLSL 1.10
This commit is contained in:
parent
9f2b62a595
commit
ddf1e4c77b
@ -55,6 +55,7 @@ typedef struct _ClutterBlurEffectClass ClutterBlurEffectClass;
|
||||
* horizontal/vertical two pass shader for the gaussian blur
|
||||
*/
|
||||
static const gchar *box_blur_glsl_shader =
|
||||
"#version 110\n"
|
||||
"uniform sampler2D tex;\n"
|
||||
"uniform float x_step, y_step;\n"
|
||||
"\n"
|
||||
@ -66,17 +67,16 @@ static const gchar *box_blur_glsl_shader =
|
||||
"void main ()\n"
|
||||
"{\n"
|
||||
" vec4 color = gl_Color * texture2D (tex, vec2 (gl_TexCoord[0].xy));\n"
|
||||
" float count = 1.0;\n"
|
||||
" color += get_rgba_rel (tex, -x_step, -y_step); count++;\n"
|
||||
" color += get_rgba_rel (tex, 0.0, -y_step); count++;\n"
|
||||
" color += get_rgba_rel (tex, x_step, -y_step); count++;\n"
|
||||
" color += get_rgba_rel (tex, -x_step, 0.0); count++;\n"
|
||||
" color += get_rgba_rel (tex, 0.0, 0.0); count++;\n"
|
||||
" color += get_rgba_rel (tex, x_step, 0.0); count++;\n"
|
||||
" color += get_rgba_rel (tex, -x_step, y_step); count++;\n"
|
||||
" color += get_rgba_rel (tex, 0.0, y_step); count++;\n"
|
||||
" color += get_rgba_rel (tex, x_step, y_step); count++;\n"
|
||||
" gl_FragColor = color / count;\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"
|
||||
" color += get_rgba_rel (tex, -x_step, 0.0);\n"
|
||||
" color += get_rgba_rel (tex, 0.0, 0.0);\n"
|
||||
" color += get_rgba_rel (tex, x_step, 0.0);\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"
|
||||
" gl_FragColor = color / 9.0;\n"
|
||||
"}";
|
||||
|
||||
struct _ClutterBlurEffect
|
||||
|
@ -84,6 +84,7 @@ struct _ClutterColorizeEffectClass
|
||||
* Addison-Wesley
|
||||
*/
|
||||
static const gchar *colorize_glsl_shader =
|
||||
"#version 110\n"
|
||||
"uniform sampler2D tex;\n"
|
||||
"uniform vec3 tint;\n"
|
||||
"\n"
|
||||
|
@ -86,6 +86,7 @@ struct _ClutterDesaturateEffectClass
|
||||
* Addison-Wesley
|
||||
*/
|
||||
static const gchar *desaturate_glsl_shader =
|
||||
"#version 110\n"
|
||||
"uniform sampler2D tex;\n"
|
||||
"uniform float factor;\n"
|
||||
"\n"
|
||||
|
Loading…
Reference in New Issue
Block a user