Skip to content

Commit

Permalink
RecalculateNormals if submesh has no normals
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyouzhao committed Dec 10, 2024
1 parent 7303c04 commit 8a8048b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions graphics/src/AssimpLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,9 @@ SubMesh AssimpLoader::Implementation::CreateSubMesh(
subMesh.AddIndex(face.mIndices[2]);
}
subMesh.SetMaterialIndex(_assimpMesh->mMaterialIndex);
if (subMesh.NormalCount() == 0u){
subMesh.RecalculateNormals();
}
return subMesh;
}

Expand Down

0 comments on commit 8a8048b

Please sign in to comment.