Skip to content

Commit c730c3d

Browse files
committed
bevy_pbr: Make prepare_clusters not exclusive
It does not need to be exclusive. It just needs to run after prepare_lights, which is exclusive.
1 parent 4f5931f commit c730c3d

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
@@ -170,12 +170,10 @@ impl Plugin for PbrPlugin {
170170
)
171171
.add_system_to_stage(
172172
RenderStage::Prepare,
173-
// this is added as an exclusive system because it contributes new views. it must run (and have Commands applied)
174-
// _before_ the `prepare_views()` system is run. ideally this becomes a normal system when "stageless" features come out
175-
render::prepare_clusters
176-
.exclusive_system()
177-
.label(RenderLightSystems::PrepareClusters)
178-
.after(RenderLightSystems::PrepareLights),
173+
// NOTE: This needs to run after prepare_lights. As prepare_lights is an exclusive system,
174+
// just adding it to the non-exclusive systems in the Prepare stage means it runs after
175+
// prepare_lights.
176+
render::prepare_clusters.label(RenderLightSystems::PrepareClusters),
179177
)
180178
.add_system_to_stage(
181179
RenderStage::Queue,

0 commit comments

Comments
 (0)