Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/bevy_pbr/src/decal/forward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ impl MaterialExtension for ForwardDecalMaterialExt {
Some(AlphaMode::Blend)
}

fn enable_shadows() -> bool {
false
}

fn specialize(
_pipeline: &MaterialExtensionPipeline,
descriptor: &mut RenderPipelineDescriptor,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/extended_material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ impl<B: Material, E: MaterialExtension> Material for ExtendedMaterial<B, E> {
}

fn enable_shadows() -> bool {
E::enable_prepass()
E::enable_shadows()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if we want to ignore the base here. I think this can lead to some bugs, similar to what got fixed here. Arguably enable_shadows is not as fatal but I think silent inconsistencies and bugs could still happen when ignoring the base.

Suggested change
E::enable_shadows()
B::enable_shadows() && E::enable_shadows()

I think the same applies to enable_prepass, but it might be out of scope for this PR.

}

fn prepass_vertex_shader() -> ShaderRef {
Expand Down