]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
uservec2.x is now the scene, .y the sobel strength, .z the threshold for sobel
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 May 2010 12:33:58 +0000 (12:33 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 May 2010 12:33:58 +0000 (12:33 +0000)
From: Wolfgang (Blub) Bumiller <blub@speed.at>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10117 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index dd00c8fea4bbec0a8f15f7f3cb2e4fa47ca187ce..1084bab155ec5ed66c736b624ddc51ccf6a106c5 100644 (file)
@@ -730,8 +730,7 @@ static const char *builtinshaderstring =
 "      gl_FragColor += texture2D(Texture_First, TexCoord1 + PixelSize*UserVec1.x*vec2( 0.707107,  0.707107)) * UserVec1.y;\n"
 "      gl_FragColor += texture2D(Texture_First, TexCoord1 + PixelSize*UserVec1.x*vec2(-0.453990,  0.891007)) * UserVec1.y;\n"
 "      gl_FragColor /= (1.0 + 5.0 * UserVec1.y);\n"
-"      //gl_FragColor = mix(gl_FragColor, vec4(vec3(sobel), 1), UseSobel);\n"
-"      gl_FragColor.rgb = gl_FragColor.rgb * UserVec2.y + vec3(sobel)*UserVec2.x;\n"
+"      gl_FragColor.rgb = gl_FragColor.rgb * UserVec2.x + vec3(max(0, sobel - UserVec2.z))*UserVec2.y;\n"
 "#endif\n"
 "\n"
 "#ifdef USESATURATION\n"