Skip to content

Commit 94b21bc

Browse files
committed
bevy_pbr: Fix and simplify scheduling of prepare_clusters system
1 parent 207ebde commit 94b21bc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

crates/bevy_pbr/src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,10 @@ impl Plugin for PbrPlugin {
150150
)
151151
.add_system_to_stage(
152152
RenderStage::Prepare,
153-
// this is added as an exclusive system because it contributes new views. it must run (and have Commands applied)
154-
// _before_ the `prepare_views()` system is run. ideally this becomes a normal system when "stageless" features come out
155-
render::prepare_clusters
156-
.exclusive_system()
157-
.label(RenderLightSystems::PrepareClusters)
158-
.after(RenderLightSystems::PrepareLights),
153+
// NOTE: This needs to run after prepare_lights. As prepare_lights is an exclusive system,
154+
// just adding it to the non-exclusive systems in the Prepare stage means it runs after
155+
// prepare_lights.
156+
render::prepare_clusters.label(RenderLightSystems::PrepareClusters),
159157
)
160158
.add_system_to_stage(
161159
RenderStage::Queue,

0 commit comments

Comments
 (0)