-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Conditional extraction to render world can cause desync #15871
Description
In retained render world, despawning the main world entity or removing its components (#15582) are the only way to remove already inserted components from render world.
Some extraction systems seem to rely on the previous behavior by extracting components conditionally, expecting render entities to be wiped out every frame.
-
Bloom
Skip bloom rendering if HDR is disabled #15856
bevy/crates/bevy_core_pipeline/src/bloom/settings.rs
Lines 222 to 229 in 813c759
match ( camera.physical_viewport_rect(), camera.physical_viewport_size(), camera.physical_target_size(), camera.is_active, camera.hdr, ) { (Some(URect { min: origin, .. }), Some(size), Some(target_size), true, true)
Turning HDR off causes crash becauseBloomcomponent is not removed. -
ChromaticAberration
if chromatic_aberration.intensity > 0.0 {
Settingintensity = 0will not be synchronized to render world if you have non-zero value currently, for example. -
ContrastAdaptiveSharpening
if !item.enabled || item.sharpening_strength == 0.0 { -
extract_depth_of_field_settings
bevy/crates/bevy_core_pipeline/src/dof/mod.rs
Line 825 in 813c759
let Projection::Perspective(ref perspective_projection) = *projection else { -
extract_taa_settings
bevy/crates/bevy_core_pipeline/src/taa/mod.rs
Line 376 in 813c759
if camera.is_active && has_perspective_projection { -
extract_camera_prepass_phase
if !camera.is_active { -
extract_clusters
bevy/crates/bevy_pbr/src/cluster/mod.rs
Line 533 in 813c759
if !camera.is_active { -
extract_camera_previous_view_data
bevy/crates/bevy_pbr/src/prepass/mod.rs
Line 587 in 813c759
if camera.is_active { -
extract_lights
bevy/crates/bevy_pbr/src/render/light.rs
Line 381 in 813c759
if !view_visibility.get() { -
extract_ssao_settings
bevy/crates/bevy_pbr/src/ssao/mod.rs
Line 538 in 813c759
if camera.is_active { -
extract_volumetric_fog
if volumetric_lights.is_empty() { -
extract_visible_components
if view_visibility.get() { -
extract_cameras
bevy/crates/bevy_render/src/camera/camera.rs
Line 1056 in 813c759
if !camera.is_active {
bevy/crates/bevy_render/src/camera/camera.rs
Lines 1073 to 1075 in 813c759
if target_size.x == 0 || target_size.y == 0 { continue; } -
extract_default_ui_camera_view
bevy/crates/bevy_ui/src/render/mod.rs
Line 521 in 813c759
if !camera.is_active {
Most of them looks like optimization. Unfortunate but won't cause visual desync probably.