]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rmain.c
fixed a third instance of the length(CubeVector) attenuation code bug (passing a...
[xonotic/darkplaces.git] / 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"