File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
crates/bevy_pbr/src/render Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -749,8 +749,7 @@ pub fn prepare_lights(
749
749
let point_light_count = point_lights
750
750
. iter ( )
751
751
. filter ( |light| light. 1 . spot_light_angles . is_none ( ) )
752
- . count ( )
753
- . min ( max_texture_cubes) ;
752
+ . count ( ) ;
754
753
755
754
let point_light_volumetric_enabled_count = point_lights
756
755
. iter ( )
@@ -1060,7 +1059,7 @@ pub fn prepare_lights(
1060
1059
for & ( light_entity, light, ( point_light_frusta, _) ) in point_lights
1061
1060
. iter ( )
1062
1061
// Lights are sorted, shadow enabled lights are first
1063
- . take ( point_light_count)
1062
+ . take ( point_light_count. min ( max_texture_cubes ) )
1064
1063
{
1065
1064
let Ok ( mut light_view_entities) = light_view_entities. get_mut ( light_entity) else {
1066
1065
continue ;
You can’t perform that action at this time.
0 commit comments