diff --git a/crates/bevy_ui/src/render/mod.rs b/crates/bevy_ui/src/render/mod.rs index f41c8f2b81..1e29575007 100644 --- a/crates/bevy_ui/src/render/mod.rs +++ b/crates/bevy_ui/src/render/mod.rs @@ -936,7 +936,6 @@ pub(crate) const QUAD_INDICES: [usize; 6] = [0, 2, 3, 0, 1, 2]; pub struct UiBatch { pub range: Range, pub image: AssetId, - pub camera: Entity, } /// The values here should match the values for the constants in `ui.wgsl` @@ -1066,8 +1065,6 @@ pub fn prepare_uinodes( || (batch_image_handle != AssetId::default() && extracted_uinode.image != AssetId::default() && batch_image_handle != extracted_uinode.image) - || existing_batch.as_ref().map(|(_, b)| b.camera) - != Some(extracted_uinode.extracted_camera_entity) { if let Some(gpu_image) = gpu_images.get(extracted_uinode.image) { batch_item_index = item_index; @@ -1076,7 +1073,6 @@ pub fn prepare_uinodes( let new_batch = UiBatch { range: vertices_index..vertices_index, image: extracted_uinode.image, - camera: extracted_uinode.extracted_camera_entity, }; batches.push((item.entity(), new_batch)); diff --git a/crates/bevy_ui/src/render/ui_texture_slice_pipeline.rs b/crates/bevy_ui/src/render/ui_texture_slice_pipeline.rs index fd9799b679..6e91bcfcfe 100644 --- a/crates/bevy_ui/src/render/ui_texture_slice_pipeline.rs +++ b/crates/bevy_ui/src/render/ui_texture_slice_pipeline.rs @@ -88,7 +88,6 @@ struct UiTextureSliceVertex { pub struct UiTextureSlicerBatch { pub range: Range, pub image: AssetId, - pub camera: Entity, } #[derive(Resource)] @@ -446,8 +445,6 @@ pub fn prepare_ui_slices( || (batch_image_handle != AssetId::default() && texture_slices.image != AssetId::default() && batch_image_handle != texture_slices.image) - || existing_batch.as_ref().map(|(_, b)| b.camera) - != Some(texture_slices.extracted_camera_entity) { if let Some(gpu_image) = gpu_images.get(texture_slices.image) { batch_item_index = item_index; @@ -457,7 +454,6 @@ pub fn prepare_ui_slices( let new_batch = UiTextureSlicerBatch { range: vertices_index..vertices_index, image: texture_slices.image, - camera: texture_slices.extracted_camera_entity, }; batches.push((item.entity(), new_batch));