-
Notifications
You must be signed in to change notification settings - Fork 21
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
commit that adds pre-multiplied to images, also changes alpha for colored container? #180
Comments
Interesting! This should be an easy fix and probably impacts our game too. |
@LPGhatguy we're noticing in #179 that the coloured texts are already premul'd (at least as far as we can tell) We also found a really bad performance issue in the alpha premultiplication. We're committing a fix for those because it heavily affects coloured texts, it takes like 5s to write 3 coloured text characters on release right now, Oops! |
P.S. We ran a profiler on yakui example to see that premul'd alpha really is taking too long. It's all on .round() |
@msparkles Those changes seem useful even outside of cosmic text. If the conversion that removes round is the same, I'd take that in a separate PR. I wonder where the best place to handle the premultiplication in the pipeline is. |
Should we cherry-pick them into a separate branch? |
Did this end up fixed as part of the cosmic text PR? |
I haven't updated winit since 0.30. is there a way i could test? |
I put some effort into upgrading. Additionally several colored box layouts and buttons seem to have gotten broken after this commit: |
I determine the color like so The pipeline uses pre multiplied alpha. yakui/crates/yakui-wgpu/src/lib.rs Line 465 in a16421c
So i guess colored box needs to be premultiplied by yakui somewhere before the rendering. |
A quick fork and change PREMULTIPLIED_ALPHA_BLENDING to ALPHA_BLENDING, and even removing |
Super odd, this is something to look into. I imagine it's affecting our game as well but not to the same extent. |
I just went back to review the commit and found a silly error. doing A/B testing the colors look the same with this fix. |
f893ad1
The first image is before the commit, second is after the commit.
The elements are colored_box and colored_box_container
The text was updated successfully, but these errors were encountered: