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:
re0312 2024-07-15 03:35:36 +08:00 committed by GitHub
parent 36c6f29832
commit 3b23aa0864
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
{