From b730fc466cef8528213f64712e2f00acbdf6a6a8 Mon Sep 17 00:00:00 2001 From: Bart Trzynadlowski Date: Tue, 26 Apr 2016 00:12:02 +0000 Subject: [PATCH] Legacy engine: vertex normals are standalone and do not need to be added to polygon normal --- Src/Graphics/Legacy3D/Models.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/Graphics/Legacy3D/Models.cpp b/Src/Graphics/Legacy3D/Models.cpp index 89a24dd..372ffb7 100644 --- a/Src/Graphics/Legacy3D/Models.cpp +++ b/Src/Graphics/Legacy3D/Models.cpp @@ -879,9 +879,9 @@ struct VBORef *CLegacy3D::CacheModel(ModelCache *Cache, int lutIdx, UINT16 texOf P.Vert[j].x = (GLfloat) (((INT32)ix)>>8) * vertexFactor; P.Vert[j].y = (GLfloat) (((INT32)iy)>>8) * vertexFactor; P.Vert[j].z = (GLfloat) (((INT32)iz)>>8) * vertexFactor; - P.Vert[j].n[0] = P.n[0]+(GLfloat)(INT8)(ix&0xFF); // vertex normals are offset from polygon normal - P.Vert[j].n[1] = P.n[1]+(GLfloat)(INT8)(iy&0xFF); - P.Vert[j].n[2] = P.n[2]+(GLfloat)(INT8)(iz&0xFF); + P.Vert[j].n[0] = (GLfloat)(INT8)(ix&0xFF); + P.Vert[j].n[1] = (GLfloat)(INT8)(iy&0xFF); + P.Vert[j].n[2] = (GLfloat)(INT8)(iz&0xFF); P.Vert[j].u = (GLfloat) ((UINT16)(it>>16)) * uvScale; // TO-DO: might these be signed? P.Vert[j].v = (GLfloat) ((UINT16)(it&0xFFFF)) * uvScale; data += 4;