Skip to content

Commit 62f7f2d

Browse files
JMS55mockersf
authored andcommitted
Fix specialize_shadows system ordering (#18412)
# Objective - Fixes #18332 ## Solution - Move specialize_shadows to ManageViews so that it can run after prepare_lights, so that shadow views exist for specialization. - Unfortunately this means that specialize_shadows is no longer in PrepareMeshes like the rest of the specialization systems. ## Testing - Ran anti_aliasing example, switched between the different AA options, observed no glitches.
1 parent 48fc396 commit 62f7f2d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/bevy_pbr/src/material.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,11 @@ where
351351
Render,
352352
(
353353
check_views_lights_need_specialization.in_set(RenderSet::PrepareAssets),
354+
// specialize_shadows::<M> also needs to run after prepare_assets::<PreparedMaterial<M>>,
355+
// which is fine since ManageViews is after PrepareAssets
354356
specialize_shadows::<M>
355-
.in_set(RenderSet::PrepareMeshes)
356-
.after(prepare_assets::<PreparedMaterial<M>>),
357+
.in_set(RenderSet::ManageViews)
358+
.after(prepare_lights),
357359
queue_shadows::<M>
358360
.in_set(RenderSet::QueueMeshes)
359361
.after(prepare_assets::<PreparedMaterial<M>>),

0 commit comments

Comments
 (0)