Fix OBJ face normal direction

https://forum.zdoom.org/viewtopic.php?f=2&t=64740
This commit is contained in:
Kevin Caccamo 2019-06-01 21:29:30 -04:00 committed by Christoph Oelckers
parent 6ba8faa7fb
commit 9f99d1b2cc

View file

@ -388,7 +388,7 @@ void FOBJModel::BuildVertexBuffer(FModelRenderer *renderer)
side + j * 3 + // Current surface and previous triangles
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 uvidx = (curSide.uvref >= 0 && (unsigned int)curSide.uvref < uvs.Size()) ? curSide.uvref : 0;