GodotVR / godot_oculus

Oculus drivers for Godot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Viewport sRGB isn't correct

DEF7 opened this issue · comments

Hi again. I was doing some OpenVR/OculusVR performance experiments running the same project on my Rift via the Oculus module and the OpenVR module and discovered that the eye textures being submitted to the Oculus VR API are not properly sRGB-spaced. I had the same issue implementing Oculus into my engine and it took a bit of fandangling to get it working right. Projects using the Oculus module look noticably brighter and washed out compared to what's rendered on the screen, whereas OpenVR projects match the coloring of the render on the screen and in the editor.

IIRC I had to set my engine up so that it rendered normally and then I blit the rendered scene to an FBO with the swapchain textures attached while GL_FRAMEBUFFER_SRGB was enabled. It was very confusing and took me an hour to figure out.

Wow! works like a charm! So the enable GL_FRAMEBUFFER_SRGB turns on converting from linear colour space to SRGB colour space. But Godot already is using the correct colour space. Not enabling it (copied that out of the oculus demos I think) solves the colour issues. COOL.

See if it works for you :)