The data rendered of imgui within window get a lighter color

Viewed 287
1 Answers

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.

  1. Use the VK_FORMAT_R8G8B8A8_UNORM to create your Swapchain as what Dear Imgui used in the backends/impl_vulkan.
  2. Or you could change the priority list to select the VK_FORMAT_R8G8B8A8_SRGB in the backends/impl_vulkan like what I did:backends/impl_vulkan: set VK_FORMAT_R8G8B8A8_SRGB as default
Related