diff --git a/crates/bevy_pbr/src/prepass/mod.rs b/crates/bevy_pbr/src/prepass/mod.rs index 66de219a90186..267dd66f314b7 100644 --- a/crates/bevy_pbr/src/prepass/mod.rs +++ b/crates/bevy_pbr/src/prepass/mod.rs @@ -407,6 +407,10 @@ impl PrepassPipeline { // since that's the only time it gets called from a prepass pipeline.) shader_defs.push("PREPASS_PIPELINE".into()); + shader_defs.push(ShaderDefVal::UInt( + "MATERIAL_BIND_GROUP".into(), + crate::MATERIAL_BIND_GROUP_INDEX as u32, + )); // NOTE: Eventually, it would be nice to only add this when the shaders are overloaded by the Material. // The main limitation right now is that bind group order is hardcoded in shaders. bind_group_layouts.push( diff --git a/crates/bevy_sprite/src/mesh2d/material.rs b/crates/bevy_sprite/src/mesh2d/material.rs index 54bf6120e64cc..84d8c80827934 100644 --- a/crates/bevy_sprite/src/mesh2d/material.rs +++ b/crates/bevy_sprite/src/mesh2d/material.rs @@ -504,7 +504,7 @@ pub(super) type DrawMaterial2d = ( SetItemPipeline, SetMesh2dViewBindGroup<0>, SetMesh2dBindGroup<1>, - SetMaterial2dBindGroup, + SetMaterial2dBindGroup, DrawMesh2d, );