Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.4.2
-
None
-
931e4ae66504f5d0be9d097565b4e9f49a92c69a, 5bb4d064945db43d62ea24b5d23bf4b0b4420e38, f9f9bea370fee029b28164c708b29d852e576945, ffa578faf02226eb53793854ad53107afea4ab91
Description
Not having proper sRGB support is a huge problem and makes it impossible for me to render my application correctly.
My current pipeline looks like this:
1. Load textures in sRGB format (GL_SRGB8_ALPHA8)
2. Render textures to GBuffer (GL_RGBA8)
3. Render lights (some with sRGB loaded textures) to an accumulation buffer (GL_RGBA16F), using GBuffer as input
4. Do HDR tonemapping from the accumulation buffer to a composition buffer (GL_SRGB8 - to preserve precision)
5. Render composition buffer to screen
Using a QOpenGLWidget, "screen" in number 5 of course means another framebuffer. I also have GL_FRAMEBUFFER_SRGB enabled in both applications.
Using this exact render pipeline yields accurate results in my non-Qt application (OpenGL Core 4.5 profile, created using GLFW3 with GLFW_SRGB_CAPABLE hint set to true)
Using this exact render pipeline yields dark results in my Qt-application (OpenGL Core 4.5 profile, created using QSurfaceFormat::setDefaultFormat() before instancing application).