-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix up tangents in MeshAssimp to help with #528.
We started to write our own implementation of mikktspace, but it required an unindexed mesh for input. This was awkward because assimp is already applying a pipeline of operations that includes tangent generation and indexing. It felt reduandant to add our own pipeline on top of that (unindexing => tangentgen => reindexing). Since assimp's CalcTangentsProcess method is already producing tangents that follow the orientation implied by texture coordinates, this simply needs to be tweaked to match glTF. (flip the bitangent) Also fixed a bug for the case where models have neither UV's nor tangents, where we were calling norm instead of normalize. :)
- Loading branch information
Showing
1 changed file
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters