From 32e20101072476b3ba425fa5a96432f30509dd73 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 20 Dec 2009 07:26:01 +0000 Subject: [PATCH] fix bug with deluxemapping (I thought GLSL had a recip function but it does not) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9595 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gl_rmain.c b/gl_rmain.c index 8353ecec..2bb2e5e8 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -1497,7 +1497,7 @@ static const char *builtinshaderstring = " // are added up. To prevent divisions by zero or strong exaggerations, a max()\n" " // nudge is done here at expense of some additional fps. This is ONLY needed for\n" " // deluxemaps, tangentspace deluxemap avoid this problem by design.\n" -" lightcolor *= recip(max(0.25, lightnormal.z));\n" +" lightcolor *= 1.0 / max(0.25, lightnormal.z);\n" "#endif // MODE_LIGHTDIRECTIONMAP_MODELSPACE\n" "#ifdef MODE_LIGHTDIRECTIONMAP_TANGENTSPACE\n" "#define SHADING\n" -- 2.39.2