The data rendered outside the window get a correct color
The data rendered within the window get a lighter color
As the images described, does anyone know what caused the problem?
The data rendered outside the window get a correct color
The data rendered within the window get a lighter color
As the images described, does anyone know what caused the problem?
The reason for the color lighter is that sRGB has a higher range of color space.
The problem above was caused by the that Dear Imgui uses VK_FORMAT_R8G8B8A8_UNORM
as the highest priority to create the Swapchain, but I use 'VK_FORMAT_R8G8B8A8_SRGB` for my purpose.
To get the problem resolved. You could choose the two methods below.
VK_FORMAT_R8G8B8A8_UNORM
to create your Swapchain as what Dear Imgui used in the backends/impl_vulkan.VK_FORMAT_R8G8B8A8_SRGB
in the backends/impl_vulkan like what I did:backends/impl_vulkan: set VK_FORMAT_R8G8B8A8_SRGB as default