From a3b7f0bde845279876a99c42e088faef1c76d376 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 2 May 2010 12:33:58 +0000 Subject: [PATCH] uservec2.x is now the scene, .y the sobel strength, .z the threshold for sobel From: Wolfgang (Blub) Bumiller git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10117 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=7ab94ccd8a97f2443c0fcd77053c230fe3591318 --- gl_rmain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index dc605362..f107146e 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -731,8 +731,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" -- 2.39.2