Skip to main content
Up and Coming
July 11, 2020

Washed out (double gamma correction) on OpenGL

  • July 11, 2020
  • 4 replies
  • 3210 views
No matter which swapchain format I specify, my OpenGL application always renders washed out. That implies that OpenGL always thinks it is rendering to a linear render target, while OpenXR always thinks I am submitting an sRGB render target. Changing the swapchain format that I ask OpenXR to create between sRGB and linear makes no difference, and neither does glEnable(GL_FRAMEBUFFER_SRGB).

4 replies

Participant
July 23, 2020
Thanks for reporting, I've filed a task.
2EyeGuyAuthor
Up and Coming
August 6, 2020
This also happens with the Oculus SDK natively (but only in OpenGL), and the Oculus SDK samples take into account this weird behaviour and manually apply a gamma of 2.2 in the pixel shader (even though the Oculus SDK documentation says it is incorrect to do that). Oculus can get away with that incorrect behaviour in their own API, but you can't do that in OpenXR because all the OpenXR runtimes have to behave the same, whether it is Oculus or SteamVR or whatever.
Currently working on Dolphin VR Follow along: https://github.com/CarlKenner/dolphin/commits/VR-Hydra Latest Version: viewtopic.php?f=42&t=11241&start=1020#p249426
Participant
February 22, 2024

Both RGB and sRGB app will show brighter images on the screen. but if you use GL(glDisable(GL_FRAMEBUFFER_SRGB_EXT))  for sRGB app, it will be correct on the screen.

As for RGB app, I found nothing helpful except do gamma correction manually in app side.