mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Cleanup render schedule (#7589)
# Objective - Fixes https://github.com/bevyengine/bevy/issues/7531 ## Solution - Add systems to prepare set - Also remove a unnecessary apply_systems_buffers from ExtractCommands set.
This commit is contained in:
parent
eeb67ee48d
commit
cd447fb4e6
4 changed files with 8 additions and 4 deletions
|
@ -284,6 +284,7 @@ impl Plugin for PbrPlugin {
|
|||
// because prepare_lights creates new views for shadow mapping
|
||||
.add_system(
|
||||
apply_system_buffers
|
||||
.in_set(RenderSet::Prepare)
|
||||
.after(RenderLightSystems::PrepareLights)
|
||||
.before(ViewSet::PrepareUniforms),
|
||||
)
|
||||
|
|
|
@ -196,7 +196,11 @@ where
|
|||
.init_resource::<RenderMaterials<M>>()
|
||||
.init_resource::<SpecializedMeshPipelines<MaterialPipeline<M>>>()
|
||||
.add_system_to_schedule(ExtractSchedule, extract_materials::<M>)
|
||||
.add_system(prepare_materials::<M>.after(PrepareAssetLabel::PreAssetPrepare))
|
||||
.add_system(
|
||||
prepare_materials::<M>
|
||||
.in_set(RenderSet::Prepare)
|
||||
.after(PrepareAssetLabel::PreAssetPrepare),
|
||||
)
|
||||
.add_system(queue_material_meshes::<M>.in_set(RenderSet::Queue));
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,6 @@ impl RenderSet {
|
|||
let mut schedule = Schedule::new();
|
||||
|
||||
// Create "stage-like" structure using buffer flushes + ordering
|
||||
schedule.add_system(apply_system_buffers.in_set(ExtractCommands));
|
||||
schedule.add_system(apply_system_buffers.in_set(PrepareFlush));
|
||||
schedule.add_system(apply_system_buffers.in_set(QueueFlush));
|
||||
schedule.add_system(apply_system_buffers.in_set(PhaseSortFlush));
|
||||
|
|
|
@ -161,8 +161,8 @@ where
|
|||
.add_system_to_schedule(ExtractSchedule, extract_materials_2d::<M>)
|
||||
.add_system(
|
||||
prepare_materials_2d::<M>
|
||||
.after(PrepareAssetLabel::PreAssetPrepare)
|
||||
.in_set(RenderSet::Prepare),
|
||||
.in_set(RenderSet::Prepare)
|
||||
.after(PrepareAssetLabel::PreAssetPrepare),
|
||||
)
|
||||
.add_system(queue_material2d_meshes::<M>.in_set(RenderSet::Queue));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue