diff --git a/crates/bevy_pbr/src/light.rs b/crates/bevy_pbr/src/light.rs index 90eda98082ae0..69eddb985944e 100644 --- a/crates/bevy_pbr/src/light.rs +++ b/crates/bevy_pbr/src/light.rs @@ -655,7 +655,7 @@ fn cluster_space_light_aabb( } // Sort point lights with shadows enabled first, then by a stable key so that the index -// can be used to render at most `MAX_POINT_LIGHT_SHADOW_MAPS` point light shadows and +// can be used to limit the number of point light shadows to render based on the device and // we keep a stable set of lights visible pub(crate) fn point_light_order( (entity_1, shadows_enabled_1): (&Entity, &bool), diff --git a/crates/bevy_pbr/src/render/light.rs b/crates/bevy_pbr/src/render/light.rs index 213ef54e9413f..a1b527faa5e54 100644 --- a/crates/bevy_pbr/src/render/light.rs +++ b/crates/bevy_pbr/src/render/light.rs @@ -707,7 +707,7 @@ pub fn prepare_lights( let max_point_light_shadow_maps = 1; // Sort point lights with shadows enabled first, then by a stable key so that the index can be used - // to render at most `MAX_POINT_LIGHT_SHADOW_MAPS` point light shadows. + // to render at most `max_point_light_shadow_maps` point light shadows. point_lights.sort_by(|(entity_1, light_1), (entity_2, light_2)| { point_light_order( (entity_1, &light_1.shadows_enabled),