-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The color is brighter on Quest3? #527
Comments
After doing some experiments, I can manage the color on the screen. Here is an example. Use grey color to debugChange the color of the boxes to grey (0.5,0.5,0.5) in https://github.com/KhronosGroup/OpenXR-SDK-Source/blob/main/src/tests/hello_xr/geometry.h#L33 Default resultsThe default program on Quest3 will show (188,188,188) which is much brighter than (127,127,127). What if we want to get (127,127,127) on Quest3 screenGLESSimilar work like Quest3 official sample code Then you will get (127,127,127) on Quest3 for Hello_xr-gles VulkanPay attention to vk format and vk color space. I have noticed that on my PC, only one combination can show (127,127,127) on my computer screen, that is RGB vk_format and SRGB vk_colorspace. Following this, the only thing we need to do is to change the vkFormat to VK_FORMAT_R8G8B8A8_UNORM at: https://github.com/KhronosGroup/OpenXR-SDK-Source/blob/main/src/tests/hello_xr/graphicsplugin_vulkan.cpp#L1007 As for SRGB color space, the swapchain color format already help us achieve this at https://github.com/KhronosGroup/OpenXR-SDK-Source/blob/main/src/tests/hello_xr/graphicsplugin_vulkan.cpp#L1555 I don't know if it is correct, but I think if I write (0.5,0.5,0.5) in my program, I really hope the color on the screen shows me (127,127,127), not (188,188,188) |
An issue (number 2433) has been filed to correspond to this issue in the internal Khronos GitLab (Khronos members only: KHR:openxr/openxr#2433 ), to facilitate working group processes. This GitHub issue will continue to be the main site of discussion. |
It seems like that on Quest3, the app shows brighter color?
In Openxr Spec, SRGB is recommended:
https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#rendering-swapchain-image-management
And also, in Quest3 official sample code, SRGB color format is also used for rendering: https://github.com/meta-quest/Meta-OpenXR-SDK/blob/main/Samples/XrSamples/XrCompositor_NativeActivity/Src/XrCompositor_NativeActivity.c#L1842
I have also done some experiments, if I follow the instructions that Oculus sample shown to us, I can get desired colors on the screen. That is to say: if I program the glclear value as (0.5,0.5,0.5), the color on Quest3's screen is (127,127,127). It is equal to middle gray 255/2=127.5
But with OpenXR-SDK-Source, the color one the screen is (187,187,187), it is more like gamma correction is applied to (127,127,127).
【Note】While using sRGB in the code, we need to use GL(glDisable(GL_FRAMEBUFFER_SRGB_EXT)) as Quest has done:
https://github.com/meta-quest/Meta-OpenXR-SDK/blob/main/Samples/XrSamples/XrSceneModel/Src/SceneModelGl.cpp#L1089
From my point of view, the color should on the screen should be the same as what I wrote in the code, not gamma corrected.
The text was updated successfully, but these errors were encountered: