Skip to content

Commit

Permalink
tolerate missing shadow cascades
Browse files Browse the repository at this point in the history
  • Loading branch information
HackerFoo committed Apr 25, 2023
1 parent 8ff18b9 commit c59b75d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/render/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1123,8 +1123,8 @@ pub fn prepare_lights(
for (cascade_index, (cascade, bound)) in light
.cascades
.get(&entity)
.unwrap()
.iter()
.flat_map(|c| c.iter())
.take(MAX_CASCADES_PER_LIGHT)
.zip(&light.cascade_shadow_config.bounds)
.enumerate()
Expand Down

0 comments on commit c59b75d

Please sign in to comment.