mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +00:00
Fix OBJ face normal direction
https://forum.zdoom.org/viewtopic.php?f=2&t=64740
This commit is contained in:
parent
6ba8faa7fb
commit
9f99d1b2cc
1 changed files with 1 additions and 1 deletions
|
@ -388,7 +388,7 @@ void FOBJModel::BuildVertexBuffer(FModelRenderer *renderer)
|
||||||
side + j * 3 + // Current surface and previous triangles
|
side + j * 3 + // Current surface and previous triangles
|
||||||
surfaces[i].vbStart; // Previous surfaces
|
surfaces[i].vbStart; // Previous surfaces
|
||||||
|
|
||||||
OBJFaceSide &curSide = surfaces[i].tris[j].sides[side];
|
OBJFaceSide &curSide = surfaces[i].tris[j].sides[2 - side];
|
||||||
|
|
||||||
int vidx = curSide.vertref;
|
int vidx = curSide.vertref;
|
||||||
int uvidx = (curSide.uvref >= 0 && (unsigned int)curSide.uvref < uvs.Size()) ? curSide.uvref : 0;
|
int uvidx = (curSide.uvref >= 0 && (unsigned int)curSide.uvref < uvs.Size()) ? curSide.uvref : 0;
|
||||||
|
|
Loading…
Reference in a new issue