pub fn check_visibility(
    thread_queues: Local<'_, ThreadLocal<Cell<Vec<Entity, Global>>>>,
    view_query: Query<'_, '_, (&mut VisibleEntities, &Frustum, Option<&RenderLayers>), With<Camera>>,
    visible_aabb_query: Query<'_, '_, (Entity, &mut ComputedVisibility, Option<&RenderLayers>, &Aabb, &GlobalTransform, Option<&NoFrustumCulling>), ()>,
    visible_no_aabb_query: Query<'_, '_, (Entity, &mut ComputedVisibility, Option<&RenderLayers>), Without<Aabb>>
)
Expand description

System updating the visibility of entities each frame.

The system is labelled with VisibilitySystems::CheckVisibility. Each frame, it updates the ComputedVisibility of all entities, and for each view also compute the VisibleEntities for that view.