Fix broken normals: restore lines removed in commit cb22d53 of 4 May 2023 (#5824)

Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
This commit is contained in:
Steve M
2024-10-15 14:42:07 -07:00
committed by GitHub
parent ce0a50ec21
commit 2591d0e490

View File

@@ -527,6 +527,7 @@ void LWOImporter::ComputeNormals(aiMesh *mesh, const std::vector<unsigned int> &
continue;
vNormals += v;
}
mesh->mNormals[idx] = vNormals.Normalize();
}
}
}
@@ -547,6 +548,7 @@ void LWOImporter::ComputeNormals(aiMesh *mesh, const std::vector<unsigned int> &
const aiVector3D &v = faceNormals[*a];
vNormals += v;
}
vNormals.Normalize();
for (std::vector<unsigned int>::const_iterator a = poResult.begin(); a != poResult.end(); ++a) {
mesh->mNormals[*a] = vNormals;
vertexDone[*a] = true;