diff --git a/crates/bevy_pbr/src/material.rs b/crates/bevy_pbr/src/material.rs index 373a295dc118b..899e050f2e200 100644 --- a/crates/bevy_pbr/src/material.rs +++ b/crates/bevy_pbr/src/material.rs @@ -784,11 +784,11 @@ fn early_sweep_material_instances( /// preparation for a new frame. fn late_sweep_material_instances( mut material_instances: ResMut, - mut removed_visibilities_query: Extract>, + mut removed_meshes_query: Extract>, ) { let last_change_tick = material_instances.current_change_tick; - for entity in removed_visibilities_query.read() { + for entity in removed_meshes_query.read() { if let Entry::Occupied(occupied_entry) = material_instances.instances.entry(entity.into()) { // Only sweep the entry if it wasn't updated this frame. It's // possible that a `ViewVisibility` component was removed and diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs index e65e9ec40c9ce..ba6ef6b82a3f6 100644 --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -1451,8 +1451,6 @@ pub fn extract_meshes_for_gpu_building( >, >, all_meshes_query: Extract>, - mut removed_visibilities_query: Extract>, - mut removed_global_transforms_query: Extract>, mut removed_meshes_query: Extract>, gpu_culling_query: Extract, Without)>>, meshes_to_reextract_next_frame: ResMut, @@ -1508,11 +1506,7 @@ pub fn extract_meshes_for_gpu_building( } // Also record info about each mesh that became invisible. - for entity in removed_visibilities_query - .read() - .chain(removed_global_transforms_query.read()) - .chain(removed_meshes_query.read()) - { + for entity in removed_meshes_query.read() { // Only queue a mesh for removal if we didn't pick it up above. // It's possible that a necessary component was removed and re-added in // the same frame. diff --git a/crates/bevy_pbr/src/render/skin.rs b/crates/bevy_pbr/src/render/skin.rs index 476e06c1e78be..2e85a8f795eb7 100644 --- a/crates/bevy_pbr/src/render/skin.rs +++ b/crates/bevy_pbr/src/render/skin.rs @@ -309,7 +309,6 @@ pub fn extract_skins( skinned_mesh_inverse_bindposes: Extract>>, changed_transforms: Extract>>, joints: Extract>, - mut removed_visibilities_query: Extract>, mut removed_skinned_meshes_query: Extract>, ) { let skin_uniforms = skin_uniforms.into_inner(); @@ -335,10 +334,7 @@ pub fn extract_skins( ); // Delete skins that became invisible. - for skinned_mesh_entity in removed_visibilities_query - .read() - .chain(removed_skinned_meshes_query.read()) - { + for skinned_mesh_entity in removed_skinned_meshes_query.read() { // Only remove a skin if we didn't pick it up in `add_or_delete_skins`. // It's possible that a necessary component was removed and re-added in // the same frame. diff --git a/crates/bevy_sprite/src/mesh2d/material.rs b/crates/bevy_sprite/src/mesh2d/material.rs index 2fd74f676c48c..cb2212e236222 100644 --- a/crates/bevy_sprite/src/mesh2d/material.rs +++ b/crates/bevy_sprite/src/mesh2d/material.rs @@ -331,7 +331,6 @@ pub fn extract_mesh_materials_2d( Or<(Changed, Changed>)>, >, >, - mut removed_visibilities_query: Extract>, mut removed_materials_query: Extract>>, ) { for (entity, view_visibility, material) in &changed_meshes_query { @@ -342,10 +341,7 @@ pub fn extract_mesh_materials_2d( } } - for entity in removed_visibilities_query - .read() - .chain(removed_materials_query.read()) - { + for entity in removed_materials_query.read() { // Only queue a mesh for removal if we didn't pick it up above. // It's possible that a necessary component was removed and re-added in // the same frame.