Fix specialize_shadows system ordering (#18412)

# Objective
- Fixes https://github.com/bevyengine/bevy/issues/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.
This commit is contained in:
JMS55 2025-03-18 23:40:45 -07:00 committed by GitHub
parent 8d5474a2f2
commit f353cc3340
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -351,9 +351,11 @@ where
Render,
(
check_views_lights_need_specialization.in_set(RenderSet::PrepareAssets),
// specialize_shadows::<M> also needs to run after prepare_assets::<PreparedMaterial<M>>,
// which is fine since ManageViews is after PrepareAssets
specialize_shadows::<M>
.in_set(RenderSet::PrepareMeshes)
.after(prepare_assets::<PreparedMaterial<M>>),
.in_set(RenderSet::ManageViews)
.after(prepare_lights),
queue_shadows::<M>
.in_set(RenderSet::QueueMeshes)
.after(prepare_assets::<PreparedMaterial<M>>),