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. :)
38 KiB
38 KiB