Skip to content

Support normal maps when no tangents exist #19069

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

Open
janhohenheim opened this issue May 5, 2025 · 0 comments
Open

Support normal maps when no tangents exist #19069

janhohenheim opened this issue May 5, 2025 · 0 comments
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!

Comments

@janhohenheim
Copy link
Member

What problem does this solve or what need does it fill?

When adding a material with a normal map to a mesh without tangents, Bevy will silently ignore the normal map

What solution would you like?

Per @DGriffin91

It would be nice to be able to fallback to screen space generated tangets here in the fragment shader, I think the code for this already exists on the meshlet path but could be used here too.

What alternative(s) have you considered?

Warn the user least in this scenario

Additional context

I ran into this and debugging took quite a while, as I expected my normal maps to be the problem. Nope, the tangents on the mesh were missing.

@janhohenheim janhohenheim added C-Feature A new feature, making something new possible A-Rendering Drawing game state to the screen S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes labels May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
Development

No branches or pull requests

1 participant