Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default UI shadow samples fix #15953

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Oct 16, 2024

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.

… 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. This PR fixes the unwrap so that the number of samples is set correctly.
@ickshonpe ickshonpe changed the title Fix UiBoxShadows unwrap Default shadow samples fix Oct 16, 2024
@ickshonpe ickshonpe changed the title Default shadow samples fix Default UI shadow samples fix Oct 16, 2024
@ickshonpe ickshonpe added A-UI Graphical user interfaces, styles, layouts, and widgets A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Needs-Review Needs reviewer attention (from anyone!) to move forward D-Trivial Nice and easy! A great choice to get started with Bevy labels Oct 16, 2024
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 16, 2024
@alice-i-cecile
Copy link
Member

Great PR description: really clearly communicates the bug and the fix.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Oct 16, 2024
Merged via the queue into bevyengine:main with commit fc659a6 Oct 16, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants