Fix culling for negative sized UI elements#22922
Fix culling for negative sized UI elements#22922GiantBlargg wants to merge 1 commit intobevyengine:mainfrom
Conversation
|
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
31cfa92 to
20c3901
Compare
ickshonpe
left a comment
There was a problem hiding this comment.
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.
…i_material, ui_texture_slice)
20c3901 to
b6000d1
Compare
|
Added fix to other pipelines as well. Feels like a lot of duplicated code though. I wonder if some parts could be consolidated. |
kfc35
left a comment
There was a problem hiding this comment.
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
Yeah, no I wasn't suggesting to do it here. Somebody else can handle that. |
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. |
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.