diff --git a/crates/bevy_pbr/src/cluster/mod.rs b/crates/bevy_pbr/src/cluster/mod.rs index a0d628474db8e..fe913a1d196bb 100644 --- a/crates/bevy_pbr/src/cluster/mod.rs +++ b/crates/bevy_pbr/src/cluster/mod.rs @@ -2,10 +2,11 @@ use std::num::NonZeroU64; +use bevy_core_pipeline::core_3d::Camera3d; use bevy_ecs::{ component::Component, entity::{Entity, EntityHashMap}, - query::Without, + query::{With, Without}, reflect::ReflectComponent, system::{Commands, Query, Res, Resource}, world::{FromWorld, World}, @@ -348,7 +349,7 @@ impl Clusters { pub fn add_clusters( mut commands: Commands, - cameras: Query<(Entity, Option<&ClusterConfig>, &Camera), Without>, + cameras: Query<(Entity, Option<&ClusterConfig>, &Camera), (Without, With)>, ) { for (entity, config, camera) in &cameras { if !camera.is_active { diff --git a/crates/bevy_pbr/src/render/light.rs b/crates/bevy_pbr/src/render/light.rs index 1356e94825ccc..e6c6548eaba9e 100644 --- a/crates/bevy_pbr/src/render/light.rs +++ b/crates/bevy_pbr/src/render/light.rs @@ -1,6 +1,6 @@ use bevy_asset::UntypedAssetId; use bevy_color::ColorToComponents; -use bevy_core_pipeline::core_3d::CORE_3D_DEPTH_FORMAT; +use bevy_core_pipeline::core_3d::{Camera3d, CORE_3D_DEPTH_FORMAT}; use bevy_ecs::entity::EntityHashSet; use bevy_ecs::prelude::*; use bevy_ecs::{entity::EntityHashMap, system::lifetimeless::Read}; @@ -515,12 +515,15 @@ pub fn prepare_lights( render_queue: Res, mut global_light_meta: ResMut, mut light_meta: ResMut, - views: Query<( - Entity, - &ExtractedView, - &ExtractedClusterConfig, - Option<&RenderLayers>, - )>, + views: Query< + ( + Entity, + &ExtractedView, + &ExtractedClusterConfig, + Option<&RenderLayers>, + ), + With, + >, ambient_light: Res, point_light_shadow_map: Res, directional_light_shadow_map: Res,