Include meshScaling in normal transform

This commit is contained in:
David Ávila Membrives 2017-12-03 20:47:41 +01:00
parent 9c2e485cfc
commit 1a46ccf7ff
1 changed files with 1 additions and 1 deletions

View File

@ -741,7 +741,7 @@ static void ReadMesh(RawModel &raw, FbxScene *pScene, FbxNode *pNode, const std:
const FbxMatrix transform = meshTransform; const FbxMatrix transform = meshTransform;
// Remove translation & scaling from transforms that will bi applied to normals, tangents & binormals // Remove translation & scaling from transforms that will bi applied to normals, tangents & binormals
const FbxMatrix normalTransform(FbxVector4(), meshRotation, FbxVector4(1.0f, 1.0f, 1.0f, 1.0f)); const FbxMatrix normalTransform(FbxVector4(), meshRotation, meshScaling);
const FbxMatrix inverseTransposeTransform = normalTransform.Inverse().Transpose(); const FbxMatrix inverseTransposeTransform = normalTransform.Inverse().Transpose();
raw.AddVertexAttribute(RAW_VERTEX_ATTRIBUTE_POSITION); raw.AddVertexAttribute(RAW_VERTEX_ATTRIBUTE_POSITION);