From: havoc Date: Sat, 7 Apr 2007 20:52:25 +0000 (+0000) Subject: fixed a third instance of the length(CubeVector) attenuation code bug (passing a... X-Git-Tag: xonotic-v0.1.0preview~3348 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=64e725d451f25792077b8c0aa99d45725d951466;p=xonotic%2Fdarkplaces.git 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 --- 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"