]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fixed a third instance of the length(CubeVector) attenuation code bug (passing a...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 7 Apr 2007 20:52:25 +0000 (20:52 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 7 Apr 2007 20:52:25 +0000 (20:52 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7073 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 2373443873e0691395bd480d39e02bed358909cd..7705043c47bebd5c711b1c17db5c4f9bb6cb7766 100644 (file)
@@ -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"