From: havoc Date: Thu, 22 Feb 2007 11:45:12 +0000 (+0000) Subject: changed light attenuation equation in the default.glsl shader in the engine X-Git-Tag: xonotic-v0.1.0preview~3520 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=37859f73ca04d221891c0067740bdc838588349f;p=xonotic%2Fdarkplaces.git changed light attenuation equation in the default.glsl shader in the engine git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6896 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index eb72ccb4..736f722c 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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"