1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Refactor global inversed matrix usage (+ minor fix)

Thanks to GreenXenith and Josiah for spotting a bug here
This commit is contained in:
Lars Mueller 2024-05-15 01:00:07 +02:00 committed by Lars Müller
parent 224066c1d3
commit d8274af670
4 changed files with 16 additions and 10 deletions

View file

@ -390,6 +390,7 @@ bool CB3DMeshFileLoader::readChunkVRTS(CSkinnedMesh::SJoint *inJoint)
// Transform the Vertex position by nested node...
inJoint->GlobalMatrix.transformVect(Vertex.Pos);
Vertex.Normal = inJoint->GlobalMatrix.rotateAndScaleVect(Vertex.Normal);
Vertex.Normal.normalize(); // renormalize: normal might have been skewed by scaling
// Add it...
BaseVertices.push_back(Vertex);