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

RenderCapture pixel values are half the expected value when using RGBA32F textures

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.9.4, 5.10.1, 5.11
    • Qt3D
    • None
    • e813fb36e782c5e0ab7c25b9c069cee709692506

    Description

      RenderCapture relies on GraphicsContext::copyGLFramebufferDataToImage to copy data from the framebuffer into the image. In copyGLFramebufferDataToImage, every pixel value is divided by 1 + the value. This results in values in the range 0 to 0.5 (or 0 to 127), which makes the image darker than expected.

      The current implementation of copyGLFramebufferDataToImage appears to attempt to map from some non-linear range of values to a linear range. However, it appears the only way to obtain numbers that are equal both when set in a shader and when read from the QImage, is to remove the division and use the value directly. That is, to map from a linear range to another linear range.

      Attachments

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

        Activity

          People

            anderhaf Anders Hafreager
            dragly Svenn-Arne Dragly
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes