Hello! Thank you for this project!
I found this bug while integrating it into my renderer,
The alpha values of transparent textures is not being blended properly leading to the alpha of the texture overiding anything below it.
Here's a capture in renderdoc to demonstrate this in the case of font textures:
This produces artifacts like this when the ui is composited on top,
This is caused by the Dst Alpha Blend Factor being set to vk::BlendFactor::ZERO, resulting in the alpha blending equation
final.a = src.a * 1.0 + dst.a * 0.0
The correct Dst Alpha Blend Factor would be vk::BlendFactor::ONE_MINUS_SRC_ALPHA, resulting in the alpha blending equation,
final.a = src.a * 1.0 + dst.a * (1.0 - src.a)
which looks like:
This is also the blend function used in imgui's reference Vulkan implementation and in the OpenGL glow implementation.
Hello! Thank you for this project! I found this bug while integrating it into my renderer, The alpha values of transparent textures is not being blended properly leading to the alpha of the texture overiding anything below it.
Here's a capture in renderdoc to demonstrate this in the case of font textures:
This produces artifacts like this when the ui is composited on top,
This is caused by the Dst Alpha Blend Factor being set to
vk::BlendFactor::ZERO
, resulting in the alpha blending equationThe correct Dst Alpha Blend Factor would be
vk::BlendFactor::ONE_MINUS_SRC_ALPHA
, resulting in the alpha blending equation,which looks like:
This is also the blend function used in imgui's reference Vulkan implementation and in the OpenGL glow implementation.