-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Description
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:
- https://github.com/bevyengine/bevy/blob/ec735b9649e21e70cf240c15bb2a95e92b242b08/crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs#L105C9-L111C10
- https://github.com/bevyengine/bevy/blob/ec735b9649e21e70cf240c15bb2a95e92b242b08/crates/bevy_pbr/src/render/mesh.rs#L381C9-L387C10
But not in shadow views:
- https://github.com/bevyengine/bevy/blob/ec735b9649e21e70cf240c15bb2a95e92b242b08/crates/bevy_pbr/src/render/light.rs#L1964C13-L1986C15
bevy/crates/bevy_pbr/src/render/light.rs
Line 1728 in ec735b9
let mut light_key = MeshPipelineKey::DEPTH_PREPASS;
or where ever it might go.
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!