Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[glTF] Calculate tangents if not provided #460

Open
footballhead opened this issue May 3, 2024 · 0 comments
Open

[glTF] Calculate tangents if not provided #460

footballhead opened this issue May 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@footballhead
Copy link
Collaborator

footballhead commented May 3, 2024

Using scene::GltfLoader, some models in glTF-Sample-Assets do not render correctly since the TANGENT primitive attribute is missing.

Currently, if tangents are not present then the tangent will be set to {0, 0, 0, 0}; normal maps won't be rendered correctly.

From 3.7.2.1:

When tangents are not specified, client implementations SHOULD calculate tangents using default MikkTSpace algorithms with the specified vertex positions, normals, and texture coordinates associated with the normal texture.

This would allow us to render more models correctly like:

@footballhead footballhead added the enhancement New feature or request label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant