From 64e725d451f25792077b8c0aa99d45725d951466 Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 7 Apr 2007 20:52:25 +0000 Subject: [PATCH] fixed a third instance of the length(CubeVector) attenuation code bug (passing a single float to a 2D texture fetch) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7073 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gl_rmain.c b/gl_rmain.c index 23734438..7705043c 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -591,7 +591,7 @@ static const char *builtinshaderstring = " color.rgb = LightColor * myhalf(texture2D(Texture_Attenuation, vec2(length(CubeVector), 0.0))) * color.rgb * (AmbientScale + DiffuseScale * myhalf(max(float(dot(surfacenormal, diffusenormal)), 0.0)));\n" "#else\n" " // calculate directionless shading\n" -" color.rgb = color.rgb * LightColor * myhalf(texture2D(Texture_Attenuation, length(CubeVector)));\n" +" color.rgb = color.rgb * LightColor * myhalf(texture2D(Texture_Attenuation, vec2(length(CubeVector), 0.0)));\n" "#endif\n" "#endif\n" "\n" -- 2.39.2