Skip to content

Commit

Permalink
Add missing limit by max_texture_cubes
Browse files Browse the repository at this point in the history
  • Loading branch information
akimakinai committed Oct 15, 2024
1 parent 8eb077c commit e2faedb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/bevy_pbr/src/render/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,8 @@ pub fn prepare_lights(
let point_light_count = point_lights
.iter()
.filter(|light| light.1.spot_light_angles.is_none())
.count();
.count()
.min(max_texture_cubes);

let point_light_volumetric_enabled_count = point_lights
.iter()
Expand Down

0 comments on commit e2faedb

Please sign in to comment.