Skip to content

Fix culling for negative sized UI elements#22922

Open
GiantBlargg wants to merge 1 commit intobevyengine:mainfrom
GiantBlargg:fix_ui_cuilling
Open

Fix culling for negative sized UI elements#22922
GiantBlargg wants to merge 1 commit intobevyengine:mainfrom
GiantBlargg:fix_ui_cuilling

Conversation

@GiantBlargg
Copy link

Objective

Fixes #22906

Solution

A similar solution had already been implemented for glyphs so I just copied that.

Testing

See #22906 for a reproduction of the bug. After applying this fix, the result matches the expected.

@github-actions
Copy link
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-UI Graphical user interfaces, styles, layouts, and widgets S-Needs-Review Needs reviewer attention (from anyone!) to move forward A-Rendering Drawing game state to the screen D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Feb 12, 2026
@alice-i-cecile alice-i-cecile added this to the 0.18.1 milestone Feb 12, 2026
@cart cart added this to Rendering Feb 12, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in Rendering Feb 12, 2026
@cart cart removed this from Rendering Feb 12, 2026
@cart cart added this to UI Feb 12, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in UI Feb 12, 2026
Copy link
Contributor

@ickshonpe ickshonpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

We should add some cases to the ui testbed for this and change the color of the text in the ui_transform example from black to a color that would be visible when the panel is missing, but those can be left to a follow up.

@GiantBlargg
Copy link
Author

GiantBlargg commented Feb 13, 2026

Added fix to other pipelines as well. Feels like a lot of duplicated code though. I wonder if some parts could be consolidated.

Copy link
Contributor

@kfc35 kfc35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the change on the reproduction example and it looks good 👍

RE: code deduplication, I personally think it can be spun out into a different issue to evaluate what code in those various prepare functions should be consolidated

@kfc35 kfc35 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 Feb 13, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in Rendering Feb 13, 2026
@GiantBlargg
Copy link
Author

RE: code deduplication, I personally think it can be spun out into a different issue to evaluate what code in those various prepare functions should be consolidated

Yeah, no I wasn't suggesting to do it here. Somebody else can handle that.

@ickshonpe
Copy link
Contributor

Added fix to other pipelines as well. Feels like a lot of duplicated code though. I wonder if some parts could be consolidated.

The main problem is the UI renderer is just really behind rest of Bevy's rendering and needs a complete overhaul. I've held back from doing big refactors here because it felt like adding any more abstractions or optimisations might not really achieve anything in the long term except to make migration to a better architecture more awkward.

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-Straightforward Simple bug fixes and API improvements, docs, test and examples 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: Needs SME Triage
Status: Needs SME Triage
Status: No status

Development

Successfully merging this pull request may close these issues.

UI elements fail to render when rotated perfectly upside down

4 participants