From 9f7a9366d442e67d58882732327341ebf72ac469 Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Wed, 16 Dec 2020 19:39:46 +0000 Subject: [PATCH] Revert "shader_glsl: Don't apply the fringe effect if it's disabled, it fixes scr_screenshot_alpha and who knows what else (terencehill)" This reverts commit a43f3de5a66db2b6c75248fe85f5ae1573ad0ee1. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13069 d7cf8633-e32d-0410-b094-e92efae38249 --- shader_glsl.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/shader_glsl.h b/shader_glsl.h index c9d45d66..11ec83dc 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -301,13 +301,10 @@ "void main(void)\n", "{\n", " float fringe = ColorFringe;//.0033f;\n", -" if (fringe) {\n", -" float amount = distance(TexCoord1, vec2(.5f,.5f));\n", -" vec2 offset = vec2(amount*fringe,amount*fringe);\n", -" dp_FragColor.xy = dp_texture2D(Texture_First, TexCoord1-offset).xy;\n", -" dp_FragColor.z = dp_texture2D(Texture_First, TexCoord1+offset).z;\n", -" } else\n", -" dp_FragColor = dp_texture2D(Texture_First, TexCoord1);\n", +" float amount = distance(TexCoord1, vec2(.5f,.5f));\n", +" vec2 offset = vec2(amount*fringe,amount*fringe);\n", +" dp_FragColor.xy = texture(Texture_First, TexCoord1-offset).xy;\n", +" dp_FragColor.z = texture(Texture_First, TexCoord1+offset).z;\n", "\n", "#ifdef USEFXAA\n", " dp_FragColor = fxaa(dp_FragColor, 8.0); // 8.0 can be changed for larger span\n", -- 2.39.2