]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
using float for sobel value
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 May 2010 12:34:05 +0000 (12:34 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 2 May 2010 14:17:31 +0000 (16:17 +0200)
From: Wolfgang (Blub) Bumiller <blub@speed.at>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10119 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=0844b647731820ea65b27974e615f9cc3c6bed1a

gl_rmain.c

index d1bcc8dade28b0eb5dbd79d92bfdd029e61e94f7..46e4eac1316a44463633f35c01cc76f508b264f6 100644 (file)
@@ -696,7 +696,7 @@ static const char *builtinshaderstring =
 "#ifdef USEPOSTPROCESSING\n"
 "// do r_glsl_dumpshader, edit glsl/default.glsl, and replace this by your own postprocessing if you want\n"
 "// this code does a blur with the radius specified in the first component of r_glsl_postprocess_uservec1 and blends it using the second component\n"
-"      vec3 sobel = vec3(1.0);\n"
+"      float sobel = 1.0;\n"
 "      // vec2 ts = textureSize(Texture_First, 0);\n"
 "      // vec2 px = vec2(1/ts.x, 1/ts.y);\n"
 "      vec2 px = PixelSize;\n"
@@ -724,7 +724,7 @@ static const char *builtinshaderstring =
 "      float py4 =  1.0 * (0.30*y4.r + 0.59*y4.g + 0.11*y4.b);\n"
 "      float py5 =  2.0 * (0.30*y5.r + 0.59*y5.g + 0.11*y5.b);\n"
 "      float py6 =  1.0 * (0.30*y6.r + 0.59*y6.g + 0.11*y6.b);\n"
-"      sobel = vec3(0.25 * abs(px1 + px2 + px3 + px4 + px5 + px6) + 0.25 * abs(py1 + py2 + py3 + py4 + py5 + py6));\n"
+"      sobel = 0.25 * abs(px1 + px2 + px3 + px4 + px5 + px6) + 0.25 * abs(py1 + py2 + py3 + py4 + py5 + py6);\n"
 "      gl_FragColor += texture2D(Texture_First, TexCoord1 + PixelSize*UserVec1.x*vec2(-0.987688, -0.156434)) * UserVec1.y;\n"
 "      gl_FragColor += texture2D(Texture_First, TexCoord1 + PixelSize*UserVec1.x*vec2(-0.156434, -0.891007)) * UserVec1.y;\n"
 "      gl_FragColor += texture2D(Texture_First, TexCoord1 + PixelSize*UserVec1.x*vec2( 0.891007, -0.453990)) * UserVec1.y;\n"