-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.9.0, 6.10.0
-
-
d41b6df6b (dev)
The texture format that is used in qopenxrgraphics_opengl.cpp for OpenGL swapchain is GL_RGBA8, but Qt Quick 3D renders its contents with tone mapping by default, so we need to request GL_SRGB8_ALPHA8_EXT instead.
// List of supported color swapchain formats.
constexpr int64_t supportedColorSwapchainFormats[] = {
GL_RGBA8,
GL_RGBA8_SNORM
};
As a temporary solution to get correct colors tonemapping can be disabled:
XrView {
environment: SceneEnvironment {
tonemapMode: SceneEnvironment.TonemapModeNone
}
}
I think the truly correct fix would be to select a linear texture format (GL_RGBA8) if tonemapping is off and select SRGB format (GL_SRGB8_ALPHA8) if tonemapping is enabled.
Interestingly, SRGB format is already used in qopenxrgraphics_opengles.cpp, but it seems desktop OpenGL didn't receive the same amount of love ![]()