]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_light.c
commented out bit-hacking 1/sqrt code
[xonotic/darkplaces.git] / 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