From 4ddab0af397f611f6c3cf0aab0ff4f1214035d37 Mon Sep 17 00:00:00 2001 From: charlotte Date: Mon, 31 Mar 2025 11:07:54 -0700 Subject: [PATCH] Add required shader defs for environment map binding arrays in deferred (#18634) # Objective Fixes #18468 ## Solution Missing shader defs caused shader compilation failure. --- crates/bevy_pbr/src/deferred/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/bevy_pbr/src/deferred/mod.rs b/crates/bevy_pbr/src/deferred/mod.rs index c7d7e04636..e40b3a940a 100644 --- a/crates/bevy_pbr/src/deferred/mod.rs +++ b/crates/bevy_pbr/src/deferred/mod.rs @@ -345,6 +345,10 @@ impl SpecializedRenderPipeline for DeferredLightingLayout { } else if shadow_filter_method == MeshPipelineKey::SHADOW_FILTER_METHOD_TEMPORAL { shader_defs.push("SHADOW_FILTER_METHOD_TEMPORAL".into()); } + if self.mesh_pipeline.binding_arrays_are_usable { + shader_defs.push("MULTIPLE_LIGHT_PROBES_IN_ARRAY".into()); + shader_defs.push("MULTIPLE_LIGHTMAPS_IN_ARRAY".into()); + } #[cfg(all(feature = "webgl", target_arch = "wasm32", not(feature = "webgpu")))] shader_defs.push("SIXTEEN_BYTE_ALIGNMENT".into());