Skip to content

Specialization keys VIEW_PROJECTION_* in depth prepass for shadow maps #20941

@Lichtso

Description

@Lichtso

Bevy version and features

Version: v0.16.1
Only default features

What you did

Created a custom material pipeline which has two very different code paths depending on perspective vs. orthographic projections because it involves billboards and ray tracing. I am aware of the existence of the view_is_orthographic runtime check, but would have liked to use the pipeline specialization for that instead, especially since they work in the "normal" forward pass.

What went wrong

The specialization keys VIEW_PROJECTION_PERSPECTIVE, VIEW_PROJECTION_ORTHOGRAPHIC, VIEW_PROJECTION_NONSTANDARD are only set for camera views:

But not in shadow views:

or where ever it might go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorS-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