From 37859f73ca04d221891c0067740bdc838588349f Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 22 Feb 2007 11:45:12 +0000 Subject: [PATCH] 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 --- gl_rmain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" -- 2.39.2