-
Notifications
You must be signed in to change notification settings - Fork 23
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
Avoid needing to gamma correct for OpenXR #136
Comments
cc @asajeffrey do you know where in the code we can get the surface to use sRGB? |
The answer may be https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_gl_colorspace.txt, but the last time I tried modifying various places in surfman that create surfaces to include it, I just kept getting EGL errors. |
Possibly the real answer is the EGL_GL_COLORSPACE parameter of https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglCreatePbufferSurface.xhtml. That being said, for openxr in immersive mode we use eglCreatePbufferFromClientBuffer which doesn't have any mention of SRGB (https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglCreatePbufferFromClientBuffer.xhtml), and that makes me suspect that we might not actually have any other changes? |
So if we just create it with sRGB on the openxr side we should be fine? I've been considering this and have a build right now for testing it, but I suspect it's not enough given what they said in Teams. |
I think all of us are just guessing at this point :/ |
From talking with jgilbert, it seems that getting the xr render layer to be sRGB would require some spec work to allow the layer format to be specified. |
Currently when we ask openxr for a color format, it asks for BGRA+sRGB as the highest preference, and then just BGRA (
DXGI_FORMAT_B8G8R8A8_UNORM
) next. We select that, since that's the format our textures are in. Apparently this leads to OpenXR running gamma-correction.Ideally we should be able to directly draw to the textures as BGRA+sRGB so that openXR doesn't have any additional work.
The text was updated successfully, but these errors were encountered: