diff --git a/crates/bevy_pbr/src/light.rs b/crates/bevy_pbr/src/light.rs index 33781bf774e084..a7d049dccc7755 100644 --- a/crates/bevy_pbr/src/light.rs +++ b/crates/bevy_pbr/src/light.rs @@ -699,7 +699,10 @@ pub(crate) fn assign_lights_to_clusters( } pub fn update_directional_light_frusta( - mut views: Query<(&GlobalTransform, &DirectionalLight, &mut Frustum)>, + mut views: Query< + (&GlobalTransform, &DirectionalLight, &mut Frustum), + Or<(Changed, Changed)>, + >, ) { for (transform, directional_light, mut frustum) in views.iter_mut() { // The frustum is used for culling meshes to the light for shadow mapping @@ -723,7 +726,10 @@ pub fn update_directional_light_frusta( // NOTE: Run this after assign_lights_to_clusters! pub fn update_point_light_frusta( global_lights: Res, - mut views: Query<(Entity, &GlobalTransform, &PointLight, &mut CubemapFrusta)>, + mut views: Query< + (Entity, &GlobalTransform, &PointLight, &mut CubemapFrusta), + Or<(Changed, Changed)>, + >, ) { let projection = Mat4::perspective_infinite_reverse_rh(std::f32::consts::FRAC_PI_2, 1.0, POINT_LIGHT_NEAR_Z);