diff --git a/examples/shader/custom_render_phase.rs b/examples/shader/custom_render_phase.rs index b11028abf9..305140dd81 100644 --- a/examples/shader/custom_render_phase.rs +++ b/examples/shader/custom_render_phase.rs @@ -43,7 +43,7 @@ use bevy::{ render_phase::{ sort_phase_system, AddRenderCommand, CachedRenderPipelinePhaseItem, DrawFunctionId, DrawFunctions, InputUniformIndex, PhaseItem, PhaseItemExtraIndex, SetItemPipeline, - SortedPhaseItem, ViewSortedRenderPhases, + SortedPhaseItem, SortedRenderPhasePlugin, ViewSortedRenderPhases, }, render_resource::{ CachedRenderPipelineId, ColorTargetState, ColorWrites, Face, FragmentState, FrontFace, @@ -54,7 +54,7 @@ use bevy::{ renderer::RenderContext, sync_world::MainEntity, view::{ExtractedView, RenderVisibleEntities, RetainedViewEntity, ViewTarget}, - Extract, Render, RenderApp, RenderSet, + Extract, Render, RenderApp, RenderDebugFlags, RenderSet, }, }; use nonmax::NonMaxU32; @@ -113,7 +113,10 @@ struct DrawStencil; struct MeshStencilPhasePlugin; impl Plugin for MeshStencilPhasePlugin { fn build(&self, app: &mut App) { - app.add_plugins((ExtractComponentPlugin::::default(),)); + app.add_plugins(( + ExtractComponentPlugin::::default(), + SortedRenderPhasePlugin::::new(RenderDebugFlags::default()), + )); // We need to get the render app from the main app let Some(render_app) = app.get_sub_app_mut(RenderApp) else { return;