Add explicit ordering between update_frusta and camera_system (#5757)
# Objective Fix a nasty system ordering bug between `update_frusta` and `camera_system` that lead to incorrect frustum s, leading to excessive culling and extremely hard-to-debug visual glitches ## Solution - add explicit system ordering
This commit is contained in:
parent
675607a7e6
commit
5e2d9b4ae4
@ -14,7 +14,10 @@ use std::cell::Cell;
|
||||
use thread_local::ThreadLocal;
|
||||
|
||||
use crate::{
|
||||
camera::{Camera, CameraProjection, OrthographicProjection, PerspectiveProjection, Projection},
|
||||
camera::{
|
||||
camera_system, Camera, CameraProjection, OrthographicProjection, PerspectiveProjection,
|
||||
Projection,
|
||||
},
|
||||
mesh::Mesh,
|
||||
primitives::{Aabb, Frustum, Sphere},
|
||||
};
|
||||
@ -186,18 +189,21 @@ impl Plugin for VisibilityPlugin {
|
||||
CoreStage::PostUpdate,
|
||||
update_frusta::<OrthographicProjection>
|
||||
.label(UpdateOrthographicFrusta)
|
||||
.after(camera_system::<OrthographicProjection>)
|
||||
.after(TransformSystem::TransformPropagate),
|
||||
)
|
||||
.add_system_to_stage(
|
||||
CoreStage::PostUpdate,
|
||||
update_frusta::<PerspectiveProjection>
|
||||
.label(UpdatePerspectiveFrusta)
|
||||
.after(camera_system::<PerspectiveProjection>)
|
||||
.after(TransformSystem::TransformPropagate),
|
||||
)
|
||||
.add_system_to_stage(
|
||||
CoreStage::PostUpdate,
|
||||
update_frusta::<Projection>
|
||||
.label(UpdateProjectionFrusta)
|
||||
.after(camera_system::<Projection>)
|
||||
.after(TransformSystem::TransformPropagate),
|
||||
)
|
||||
.add_system_to_stage(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user