-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1-frame rendering flashes when changing the scene #18332
Comments
messing with the
|
Does X mean the flash happens and O means it doesn't? |
@superdump the opposite, X no flash, O flash |
I did a little more debugging. The issue is specifically with shadows not rendering for 1(?) frame when something with the view changes (not sure exactly what yet). If I comment out this line, the bug goes away. bevy/crates/bevy_pbr/src/render/light.rs Line 1900 in 205ae64
|
Even more debugging: it happens for exactly 1 frame, and it's due to this query: bevy/crates/bevy_pbr/src/render/light.rs Line 1739 in 205ae64
matching 0 entities. This causes all_shadow_views to be empty, so the pipeline cache gets entirely emptied out. |
Ah ok so it's a system ordering issue. specialize_shadows::<M>.in_set(RenderSet::PrepareMeshes);
prepare_lights.in_set(RenderSet::ManageViews); PrepareMeshes runs before ManageViews, but specialize_shadows needs to run after prepare_lights. |
# 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.
# 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.
Bevy version
0.16-dev since 5e569af.
What you did
Run cargo run --example anti_aliasing, and toggle back and forth between the different AA methods (give the first few times a few seconds to compile the pipelines).
What went wrong
Switching the AA method causes a 1-frame flash where the mesh doesn't render properly.
The text was updated successfully, but these errors were encountered: