mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
This should correctly compute the normal of all BUILD floors and walls. Fixes bug 2806174 (E1L1 projection room floor not affected by light and parallaxing artifacts).
git-svn-id: https://svn.eduke32.com/eduke32@1589 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
86fefa266d
commit
80b6a96901
1 changed files with 5 additions and 5 deletions
|
@ -2867,7 +2867,7 @@ static void polymer_drawwall(int16_t sectnum, int16_t wallnum)
|
|||
if (pr_verbosity >= 3) OSD_Printf("PR : Finished drawing wall %i...\n", wallnum);
|
||||
}
|
||||
|
||||
#define INDICE(n) ((p->indices) ? (p->indices[i+n]*5) : ((i+n)*5))
|
||||
#define INDICE(n) ((p->indices) ? (p->indices[(i+n)%p->indicescount]*5) : (((i+n)%p->vertcount)*5))
|
||||
|
||||
// HSR
|
||||
static void polymer_computeplane(_prplane* p)
|
||||
|
@ -2909,8 +2909,7 @@ static void polymer_computeplane(_prplane* p)
|
|||
norm = plane[0] * plane[0] + plane[1] * plane[1] + plane[2] * plane[2];
|
||||
|
||||
// hack to work around a precision issue with slopes
|
||||
if ((norm >= 15000) ||
|
||||
(((p->indices) ? p->indices[i+2] : i+2) >= p->vertcount))
|
||||
if (norm >= 15000)
|
||||
{
|
||||
// normalize the normal/plane equation and calculate its plane norm
|
||||
norm = -sqrt(norm);
|
||||
|
@ -2979,9 +2978,10 @@ static void polymer_computeplane(_prplane* p)
|
|||
|
||||
break;
|
||||
}
|
||||
i+= 1;
|
||||
i+= (p->indices) ? 3 : 1;
|
||||
}
|
||||
while ((i + 2) < p->indicescount);
|
||||
while ((p->indices && i < p->indicescount) ||
|
||||
(!p->indices && i < p->vertcount));
|
||||
}
|
||||
|
||||
static inline void polymer_crossproduct(GLfloat* in_a, GLfloat* in_b, GLfloat* out)
|
||||
|
|
Loading…
Reference in a new issue