[qfvis] Remove (mostly) unnecessary vector normalization

Because of the way the plane normal is used (front/on/back checks, and
midpoint calculation), other than possible precision, there is no need
to normalize the normal. Removing the square root and division resulted
in a huge boost: from 34s to 14 seconds. The average clusters visible
hasn't change much, and a quick check in-game didn't show any issues.
This commit is contained in:
Bill Currie 2022-11-19 23:16:47 +09:00
parent d283f07890
commit 1cada2c931

View file

@ -151,7 +151,6 @@ calc_plane (vec4f_t v1, vec4f_t v2, int flip, vec4f_t p, vec4f_t *plane)
if (length[0] < ON_EPSILON)
return 0;
*plane /= vsqrt4f (length);
(*plane)[3] = -dotf (p, *plane)[0];
return 1;
}