Skip to content

Support normal maps when no tangents exist #19069

Open
@janhohenheim

Description

@janhohenheim

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-FeatureA new feature, making something new possibleD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions