Sweep old entities from 2D binned render phases (#17903)
# Objective - #17787 removed sweeping of binned render phases from 2D by accident due to them not using the `BinnedRenderPhasePlugin`. - Fixes #17885 ## Solution - Schedule `sweep_old_entities` in `QueueSweep` like `BinnedRenderPhasePlugin` does, but for 2D where that plugin is not used. ## Testing Tested with the modified `shader_defs` example in #17885 .
This commit is contained in:
parent
82f6f704da
commit
8e783d347f
@ -1,6 +1,6 @@
|
|||||||
use bevy_app::Plugin;
|
use bevy_app::Plugin;
|
||||||
use bevy_asset::{load_internal_asset, weak_handle, AssetId, Handle};
|
use bevy_asset::{load_internal_asset, weak_handle, AssetId, Handle};
|
||||||
use bevy_render::render_phase::InputUniformIndex;
|
use bevy_render::render_phase::{sweep_old_entities, InputUniformIndex};
|
||||||
|
|
||||||
use crate::{tonemapping_pipeline_key, Material2dBindGroupId};
|
use crate::{tonemapping_pipeline_key, Material2dBindGroupId};
|
||||||
use bevy_core_pipeline::tonemapping::DebandDither;
|
use bevy_core_pipeline::tonemapping::DebandDither;
|
||||||
@ -115,6 +115,11 @@ impl Plugin for Mesh2dRenderPlugin {
|
|||||||
.add_systems(
|
.add_systems(
|
||||||
Render,
|
Render,
|
||||||
(
|
(
|
||||||
|
(
|
||||||
|
sweep_old_entities::<Opaque2d>,
|
||||||
|
sweep_old_entities::<AlphaMask2d>,
|
||||||
|
)
|
||||||
|
.in_set(RenderSet::QueueSweep),
|
||||||
batch_and_prepare_binned_render_phase::<Opaque2d, Mesh2dPipeline>
|
batch_and_prepare_binned_render_phase::<Opaque2d, Mesh2dPipeline>
|
||||||
.in_set(RenderSet::PrepareResources),
|
.in_set(RenderSet::PrepareResources),
|
||||||
batch_and_prepare_binned_render_phase::<AlphaMask2d, Mesh2dPipeline>
|
batch_and_prepare_binned_render_phase::<AlphaMask2d, Mesh2dPipeline>
|
||||||
|
Loading…
Reference in New Issue
Block a user