From: divverent Date: Sat, 10 Jan 2009 19:40:52 +0000 (+0000) Subject: add a second parameter to the blur to mix the pentagram blur with the main image X-Git-Tag: xonotic-v0.1.0preview~1950 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=2961039d9bd10e9aa838e243728e4b1acb03bb2c add a second parameter to the blur to mix the pentagram blur with the main image git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8642 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index e41026c6..b48508a3 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -496,13 +496,13 @@ static const char *builtinshaderstring = "\n" "#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\n" -" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2( 0.987688, 0.156434));\n" -" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2( 0.156434, 0.891007));\n" -" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2(-0.891007, 0.453990));\n" -" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2(-0.707107, -0.707107));\n" -" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2( 0.453990, -0.891007));\n" -" gl_FragColor /= 6;\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" +" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2( 0.987688, 0.156434)) * UserVec1.y;\n" +" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2( 0.156434, 0.891007)) * UserVec1.y;\n" +" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2(-0.891007, 0.453990)) * UserVec1.y;\n" +" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2(-0.707107, -0.707107)) * UserVec1.y;\n" +" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2( 0.453990, -0.891007)) * UserVec1.y;\n" +" gl_FragColor /= (1 + 5 * UserVec1.y);\n" "#endif\n" "\n" "#ifdef USEGAMMARAMPS\n"