Fix prepass batch (#13943)
# Objective - After #11804 , The queue_prepass_material_meshes function is now executed in parallel with other queue_* systems. This optimization introduced a potential issue where mesh_instance.should_batch() could return false in queue_prepass_material_meshes due to an unset material_bind_group_id.
This commit is contained in:
parent
36c6f29832
commit
3b23aa0864
@ -851,6 +851,9 @@ pub fn queue_prepass_material_meshes<M: Material>(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mesh_instance
|
||||||
|
.material_bind_group_id
|
||||||
|
.set(material.get_bind_group_id());
|
||||||
match mesh_key
|
match mesh_key
|
||||||
.intersection(MeshPipelineKey::BLEND_RESERVED_BITS | MeshPipelineKey::MAY_DISCARD)
|
.intersection(MeshPipelineKey::BLEND_RESERVED_BITS | MeshPipelineKey::MAY_DISCARD)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user