We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2223f6e commit 50d38f2Copy full SHA for 50d38f2
crates/bevy_pbr/src/render/light.rs
@@ -749,8 +749,7 @@ pub fn prepare_lights(
749
let point_light_count = point_lights
750
.iter()
751
.filter(|light| light.1.spot_light_angles.is_none())
752
- .count()
753
- .min(max_texture_cubes);
+ .count();
754
755
let point_light_volumetric_enabled_count = point_lights
756
@@ -1060,7 +1059,7 @@ pub fn prepare_lights(
1060
1059
for &(light_entity, light, (point_light_frusta, _)) in point_lights
1061
1062
// Lights are sorted, shadow enabled lights are first
1063
- .take(point_light_count)
+ .take(point_light_count.min(max_texture_cubes))
1064
{
1065
let Ok(mut light_view_entities) = light_view_entities.get_mut(light_entity) else {
1066
continue;
0 commit comments