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/prepass/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_sprite/src/mesh2d/material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ pub(super) type DrawMaterial2d<M> = (
SetItemPipeline,
SetMesh2dViewBindGroup<0>,
SetMesh2dBindGroup<1>,
SetMaterial2dBindGroup<M, 2>,
SetMaterial2dBindGroup<M, MATERIAL_2D_BIND_GROUP_INDEX>,
DrawMesh2d,
);

Expand Down
Loading