From: havoc Date: Wed, 9 Apr 2014 04:35:09 +0000 (+0000) Subject: patch from graphitemaster that changes r_fxaa use of texture2D in X-Git-Tag: xonotic-v0.8.0~74 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d5acba603392b988519e6f3b2907d8e23b9f4e27;p=xonotic%2Fdarkplaces.git patch from graphitemaster that changes r_fxaa use of texture2D in default.glsl to use dp_texture2D instead (which resolves to the correct texture function on later GL versions) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12061 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=f6dad5a1884f3d5e6c20ad378af8899bb01e7aba --- diff --git a/shader_glsl.h b/shader_glsl.h index cb839f10..3e150a22 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -256,11 +256,11 @@ " float minreduct = (1.0 / 128.0);\n", "\n", " // directions\n", -" vec3 NW = texture2D(Texture_First, TexCoord1 + (vec2(-1.0, -1.0) * PixelSize)).xyz;\n", -" vec3 NE = texture2D(Texture_First, TexCoord1 + (vec2(+1.0, -1.0) * PixelSize)).xyz;\n", -" vec3 SW = texture2D(Texture_First, TexCoord1 + (vec2(-1.0, +1.0) * PixelSize)).xyz;\n", -" vec3 SE = texture2D(Texture_First, TexCoord1 + (vec2(+1.0, +1.0) * PixelSize)).xyz;\n", -" vec3 M = texture2D(Texture_First, TexCoord1).xyz;\n", +" vec3 NW = dp_texture2D(Texture_First, TexCoord1 + (vec2(-1.0, -1.0) * PixelSize)).xyz;\n", +" vec3 NE = dp_texture2D(Texture_First, TexCoord1 + (vec2(+1.0, -1.0) * PixelSize)).xyz;\n", +" vec3 SW = dp_texture2D(Texture_First, TexCoord1 + (vec2(-1.0, +1.0) * PixelSize)).xyz;\n", +" vec3 SE = dp_texture2D(Texture_First, TexCoord1 + (vec2(+1.0, +1.0) * PixelSize)).xyz;\n", +" vec3 M = dp_texture2D(Texture_First, TexCoord1).xyz;\n", "\n", " // luminance directions\n", " vec3 luma = vec3(0.299, 0.587, 0.114);\n", @@ -280,11 +280,11 @@ " dir = min(vec2(maxspan, maxspan), max(vec2(-maxspan, -maxspan), dir * rcp)) * PixelSize;\n", "\n", " vec3 rA = (1.0/2.0) * (\n", -" texture2D(Texture_First, TexCoord1 + dir * (1.0/3.0 - 0.5)).xyz +\n", -" texture2D(Texture_First, TexCoord1 + dir * (2.0/3.0 - 0.5)).xyz);\n", +" dp_texture2D(Texture_First, TexCoord1 + dir * (1.0/3.0 - 0.5)).xyz +\n", +" dp_texture2D(Texture_First, TexCoord1 + dir * (2.0/3.0 - 0.5)).xyz);\n", " vec3 rB = rA * (1.0/2.0) + (1.0/4.0) * (\n", -" texture2D(Texture_First, TexCoord1 + dir * (0.0/3.0 - 0.5)).xyz +\n", -" texture2D(Texture_First, TexCoord1 + dir * (3.0/3.0 - 0.5)).xyz);\n", +" dp_texture2D(Texture_First, TexCoord1 + dir * (0.0/3.0 - 0.5)).xyz +\n", +" dp_texture2D(Texture_First, TexCoord1 + dir * (3.0/3.0 - 0.5)).xyz);\n", " float lB = dot(rB, luma);\n", "\n", " ret.xyz = ((lB < lMin) || (lB > lMax)) ? rA : rB;\n",