]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
commented out bit-hacking 1/sqrt code
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 30 Aug 2002 13:17:32 +0000 (13:17 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 30 Aug 2002 13:17:32 +0000 (13:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2318 d7cf8633-e32d-0410-b094-e92efae38249

r_light.c

index 965b8191196644688974498d71e36beaa99d05ab..f6b8d4803ca86e0238dd314122e1a9e688255251 100644 (file)
--- a/r_light.c
+++ b/r_light.c
@@ -918,12 +918,12 @@ void R_LightModel(const entity_render_t *ent, int numverts, float colorr, float
                                        f = (1.0f / (dist2 * nl->falloff + nl->offset)) - nl->subtract;
                                        if (f > 0)
                                        {
-                                               #if SLOWMATH
+                                               //#if SLOWMATH
                                                t = 1.0f / sqrt(dist2);
-                                               #else
-                                               *((int *)&t) = 0x5f3759df - ((* (int *) &dist2) >> 1);
-                                               t = t * (1.5f - (dist2 * 0.5f * t * t));
-                                               #endif
+                                               //#else
+                                               //*((int *)&t) = 0x5f3759df - ((* (int *) &dist2) >> 1);
+                                               //t = t * (1.5f - (dist2 * 0.5f * t * t));
+                                               //#endif
 
                                                // dot * t is dotproduct with a normalized v.
                                                // (the result would be -1 to +1, but we already