Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-50987

Implement sRGB support for QSurfaceFormat / QOpenGLWidget

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.4.2
    • Fix Version/s: 5.10.0 Alpha
    • Component/s: GUI: OpenGL
    • Labels:
      None
    • Commits:
      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).

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            lagocs Laszlo Agocs
            Reporter:
            fredriksvantesson Fredrik
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes