diff --git a/crates/bevy_ui/src/render/box_shadow.rs b/crates/bevy_ui/src/render/box_shadow.rs index 50e602149c..7ed9855038 100644 --- a/crates/bevy_ui/src/render/box_shadow.rs +++ b/crates/bevy_ui/src/render/box_shadow.rs @@ -365,10 +365,8 @@ pub fn queue_shadows( draw_function, pipeline, entity: (entity, extracted_shadow.main_entity), - sort_key: ( - FloatOrd(extracted_shadow.stack_index as f32 + stack_z_offsets::BOX_SHADOW), - entity.index(), - ), + sort_key: FloatOrd(extracted_shadow.stack_index as f32 + stack_z_offsets::BOX_SHADOW), + batch_range: 0..0, extra_index: PhaseItemExtraIndex::None, index, diff --git a/crates/bevy_ui/src/render/mod.rs b/crates/bevy_ui/src/render/mod.rs index 3c0e353f03..b5d24f194d 100644 --- a/crates/bevy_ui/src/render/mod.rs +++ b/crates/bevy_ui/src/render/mod.rs @@ -981,10 +981,7 @@ pub fn queue_uinodes( draw_function, pipeline, entity: (entity, extracted_uinode.main_entity), - sort_key: ( - FloatOrd(extracted_uinode.stack_index as f32 + stack_z_offsets::NODE), - entity.index(), - ), + sort_key: FloatOrd(extracted_uinode.stack_index as f32 + stack_z_offsets::NODE), index, // batch_range will be calculated in prepare_uinodes batch_range: 0..0, diff --git a/crates/bevy_ui/src/render/render_pass.rs b/crates/bevy_ui/src/render/render_pass.rs index f89133e31e..e0b3b20fab 100644 --- a/crates/bevy_ui/src/render/render_pass.rs +++ b/crates/bevy_ui/src/render/render_pass.rs @@ -106,7 +106,7 @@ impl Node for UiPassNode { } pub struct TransparentUi { - pub sort_key: (FloatOrd, u32), + pub sort_key: FloatOrd, pub entity: (Entity, MainEntity), pub pipeline: CachedRenderPipelineId, pub draw_function: DrawFunctionId, @@ -153,7 +153,7 @@ impl PhaseItem for TransparentUi { } impl SortedPhaseItem for TransparentUi { - type SortKey = (FloatOrd, u32); + type SortKey = FloatOrd; #[inline] fn sort_key(&self) -> Self::SortKey { diff --git a/crates/bevy_ui/src/render/ui_material_pipeline.rs b/crates/bevy_ui/src/render/ui_material_pipeline.rs index 2162b92373..fb893b390e 100644 --- a/crates/bevy_ui/src/render/ui_material_pipeline.rs +++ b/crates/bevy_ui/src/render/ui_material_pipeline.rs @@ -665,10 +665,7 @@ pub fn queue_ui_material_nodes( draw_function, pipeline, entity: (extracted_uinode.render_entity, extracted_uinode.main_entity), - sort_key: ( - FloatOrd(extracted_uinode.stack_index as f32 + stack_z_offsets::MATERIAL), - extracted_uinode.render_entity.index(), - ), + sort_key: FloatOrd(extracted_uinode.stack_index as f32 + stack_z_offsets::MATERIAL), batch_range: 0..0, extra_index: PhaseItemExtraIndex::None, index, 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 68c6a4a3ef..dee19ad867 100644 --- a/crates/bevy_ui/src/render/ui_texture_slice_pipeline.rs +++ b/crates/bevy_ui/src/render/ui_texture_slice_pipeline.rs @@ -372,9 +372,8 @@ pub fn queue_ui_slices( draw_function, pipeline, entity: (extracted_slicer.render_entity, extracted_slicer.main_entity), - sort_key: ( - FloatOrd(extracted_slicer.stack_index as f32 + stack_z_offsets::TEXTURE_SLICE), - extracted_slicer.render_entity.index(), + sort_key: FloatOrd( + extracted_slicer.stack_index as f32 + stack_z_offsets::TEXTURE_SLICE, ), batch_range: 0..0, extra_index: PhaseItemExtraIndex::None,