mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[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:
parent
d283f07890
commit
1cada2c931
1 changed files with 0 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue