glTF importer fixes#290
Merged
jeffamstutz merged 8 commits intoNVIDIA:next_releasefrom May 1, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the glTF importer and shared tangent-generation utilities to better handle real-world glTF assets, including multiple UV sets, more index formats, strided/interleaved accessors, and improved tangent/normal-map handling.
Changes:
- Add support for selecting among multiple
TEXCOORD_nsets when wiring textures/material samplers. - Improve mesh attribute ingestion by using stride-aware accessor copies and supporting
UNSIGNED_BYTEindices. - Extend tangent reconstruction to support optional normal input, optional V-flip, and optional face-varying tangent outputs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tsd/src/tsd/io/importers/import_GLTF.cpp |
Adds multi-UV wiring, strided accessor copying helpers, expanded index handling, and updated tangent reconstruction logic. |
tsd/src/tsd/io/importers/detail/importer_common.hpp |
Extends calcTangentsForTriangleMesh() API with defaults for texcoord Y-flip and face-varying tangents. |
tsd/src/tsd/io/importers/detail/importer_common.cpp |
Implements optional texcoord Y-flip and face-varying tangent output in tangent generation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Downstream code attaches surfaces to nodes via surfaces[surfaceIndex + i], assuming a 1:1 primitive→surface mapping which was not always true.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix glTF importer with: