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

vulkan: All images are using premultiplied alpha #161

Open
LPGhatguy opened this issue May 16, 2024 · 1 comment · May be fixed by #166
Open

vulkan: All images are using premultiplied alpha #161

LPGhatguy opened this issue May 16, 2024 · 1 comment · May be fixed by #166
Assignees
Labels
bug Something isn't working vulkan

Comments

@LPGhatguy
Copy link
Member

The Vulkan backend currently only creates one pipeline for both regular graphics and for text. However, there need to be two pipelines (like the wgpu backend) so that the correct blending mode can be chosen: normally alpha blending, and premultiplied alpha blending for text.

This bug makes it so that images with alpha are rendered as much brighter than they should be with the Vulkan backend.

@LPGhatguy LPGhatguy added bug Something isn't working vulkan labels May 16, 2024
@kanerogers
Copy link
Collaborator

D'oh! Should have picked this one up sooner. We could try and be fancy and use VK_EXT_extended_dynamic_state3 to do this dynamically, but that's absolute overkill for this. Solution is just to add a second pipeline and switch between them, a-la the wgpu backend.

@kanerogers kanerogers linked a pull request May 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vulkan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants