]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
changed light attenuation equation in the default.glsl shader in the engine
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 22 Feb 2007 11:45:12 +0000 (11:45 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 22 Feb 2007 11:45:12 +0000 (11:45 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6896 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index eb72ccb4b8fbe8b7c574599b55de9ab268dfec74..736f722c532eae7b592b3d7d1d18447ef6dd56e5 100644 (file)
@@ -621,7 +621,8 @@ static const char *builtinshaderstring =
 "      //\n"
 "      // pow(1-(x*x+y*y+z*z), 4) is far more realistic but needs large lights to\n"
 "      // provide significant illumination, large = slow = pain.\n"
-"      color.rgb *= myhalf(max(1.0 - dot(CubeVector, CubeVector), 0.0));\n"
+"//    color.rgb *= myhalf(max(1.0 - dot(CubeVector, CubeVector), 0.0));\n"
+"      color.rgb *= myhalf(max(2.0 - 2.0 * length(CubeVector), 0.0) / (1 + dot(CubeVector, CubeVector)));\n"
 "\n"
 "\n"
 "\n"