Skip to content

Commit e2faedb

Browse files
committed
Add missing limit by max_texture_cubes
1 parent 8eb077c commit e2faedb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/bevy_pbr/src/render/light.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,8 @@ pub fn prepare_lights(
735735
let point_light_count = point_lights
736736
.iter()
737737
.filter(|light| light.1.spot_light_angles.is_none())
738-
.count();
738+
.count()
739+
.min(max_texture_cubes);
739740

740741
let point_light_volumetric_enabled_count = point_lights
741742
.iter()

0 commit comments

Comments
 (0)