Default UI shadow samples fix (#15953)

# Objective

In `queue_shadows`, the `UiBoxShadows` option is unwrapped incorrectly
which results in the number of shadow samples being set to
`u32::default()` instead of `UiBoxShadows::default()` if the camera
entity doesn't have the component.

## Solution

Just use `unwrap_or_default` directly without `map`.
This commit is contained in:
ickshonpe 2024-10-16 18:01:10 +01:00 committed by GitHub
parent eb67c81059
commit fc659a6143
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -356,7 +356,7 @@ pub fn queue_shadows(
&ui_slicer_pipeline,
UiTextureSlicePipelineKey {
hdr: view.hdr,
samples: shadow_samples.map(|samples| samples.0).unwrap_or_default(),
samples: shadow_samples.copied().unwrap_or_default().0,
},
);