[428/906] laplacian: Avoid using GLSL 1.20 features in a non-#versioned shader.

Fixes compile on Mesa.
This commit is contained in:
Eric Anholt 2010-04-13 16:20:02 -07:00 committed by Matthew Waters
parent b59d050e84
commit 2c905bda24

View file

@ -71,10 +71,16 @@ static const gchar *convolution_fragment_source =
"uniform float norm_offset;" "uniform float norm_offset;"
"uniform float kernel[9];" "uniform float kernel[9];"
"void main () {" "void main () {"
" vec2 offset[9] = vec2[9] (" " vec2 offset[9];"
" vec2(-1.0,-1.0), vec2( 0.0,-1.0), vec2( 1.0,-1.0)," " offset[0] = vec2(-1.0,-1.0);"
" vec2(-1.0, 0.0), vec2( 0.0, 0.0), vec2( 1.0, 0.0)," " offset[1] = vec2( 0.0,-1.0);"
" vec2(-1.0, 1.0), vec2( 0.0, 1.0), vec2( 1.0, 1.0) );" " offset[2] = vec2( 1.0,-1.0);"
" offset[3] = vec2(-1.0, 0.0);"
" offset[4] = vec2( 0.0, 0.0);"
" offset[5] = vec2( 1.0, 0.0);"
" offset[6] = vec2(-1.0, 1.0);"
" offset[7] = vec2( 0.0, 1.0);"
" offset[8] = vec2( 1.0, 1.0);"
" vec2 texturecoord = gl_TexCoord[0].st;" " vec2 texturecoord = gl_TexCoord[0].st;"
" int i;" " int i;"
" vec4 sum = vec4 (0.0);" " vec4 sum = vec4 (0.0);"