mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Work around a precision bug that would cause colinear wall vectors to only be "almost" colinear, causing the cross product to be wrongly validated and resulting in bogus normal vectors for some surfaces.
git-svn-id: https://svn.eduke32.com/eduke32@1234 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
ad1091b2df
commit
7d7a705af9
1 changed files with 1 additions and 1 deletions
|
@ -2152,7 +2152,7 @@ static void polymer_buffertoplane(GLfloat* buffer, GLushort* indices, in
|
||||||
vec1[0] = plane[0] * plane[0] + plane[1] * plane[1] + plane[2] * plane[2];
|
vec1[0] = plane[0] * plane[0] + plane[1] * plane[1] + plane[2] * plane[2];
|
||||||
i+= 3;
|
i+= 3;
|
||||||
}
|
}
|
||||||
while ((i < indicecount) && (vec1[0] == 0));
|
while ((i < indicecount) && (vec1[0] < 5000)); // hack to work around a precision issue with slopes
|
||||||
|
|
||||||
vec1[0] = sqrt(vec1[0]);
|
vec1[0] = sqrt(vec1[0]);
|
||||||
plane[0] /= vec1[0];
|
plane[0] /= vec1[0];
|
||||||
|
|
Loading…
Reference in a new issue