mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
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
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
.intersection(MeshPipelineKey::BLEND_RESERVED_BITS | MeshPipelineKey::MAY_DISCARD)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue