Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
6.7.0 Beta1
-
None
Description
I am using QQuickRenderTarget to perform off-screen rendering of a QQuickWindow's content. This QQuickRenderTarget comes from a VkImage, and the format of this VkImage is VK_FORMAT_B8G8R8A8_SRGB, representing it in the sRGB color space. Eventually, this VkImage with the VK_FORMAT_B8G8R8A8_SRGB format will be directly sent to the display. Yes, I am developing a Wayland compositor.
Considering the characteristics of the sRGB space, I should apply gamma correction for each QQuickItem in this QQuickWindow. For instance, when creating a Vulkan texture for QQuickImage, QRhiTexture::sRGB should be enabled. The colors set for QQuickRectangle should also undergo gamma correction. Otherwise, the QQuickImage or QQuickRectangle displayed on the screen will appear brighter than expected, as it undergoes gamma adjustment erroneously twice.
Although QQuickImageBase provides the colorSpace property for user utilization, this property may not be applicable in this case. Even if it were, users might not be able to use it because in a Wayland compositor, QQuickImage might not be directly used. It could be that only a Button control from QtQuick Controls is used within the Button control, utilizing an Image. However, the Wayland compositor cannot control it.
I am unsure whether we can support such scenarios in Qt. For example, should Qt Shader Effects also adapt to sRGB rendering targets? I am uncertain about the extent of modifications required to support sRGB rendering targets. Alternatively, are we not planning to support sRGB rendering targets for QQuickWindow?
Attachments
Issue Links
- blocks
-
QTBUG-119193 QtQuick not supported sRGB render target
-
- Closed
-