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

Implement proper Tone-mapping logic

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P1: Critical
    • 6.0.0
    • 5.15
    • Quick: 3D
    • None
    • 10
    • 002582d1090efca9ea893357907db80af5e1a3a1 (qt/qtquick3d/dev)
    • Qt Quick 3D - Week 19/20, Qt Quick 3D - 33 - 34, Qt Quick 3D - 35 - 36

    Description

      Currently the engine renders into linear color space, but this doesn't get corrected before getting rendered by Qt Quick. It is even somewhat broken now because while the Skybox rendering is tonemapped and gamma corrected, the scene rendered is not. We have several different potential paths so Tonemapping in a generic way is difficult.

      Direct Rendering:
      Overlay
      Underlay
      RenderNode

      In the direct rendering case we would need to perform Tonemapping and gamma correction as part of the shading for each draw call. So before gl_fragColor = ... we would need to call a tonemap function.

      Offscreen Rendering:

      In the offscreen rendering case, we have an opportunity to perform color correction only once before it is rendered by Qt Quick. Right now we just use a simple texture node which would just perform a blit, but here we could have a custom tonemapped texture node which performes the tone mapping function once per view.

      Post Processing:
      When using post processing effects with any of the View3D render modes, the 3D scene is always rendered off-screen internally, so we would need to turn off both of the above methods conditionally, and then the expectation is that the Post processing stack would be responsible for tone-mapping, as this is normally where this step is done in 3d engines.

      This creates somewhat convoluted logic, so whatever solution is created should provide test cases to validate each case working, and regression tests so we can keep this logic sound.

      Attachments

        For Gerrit Dashboard: QTBUG-82335
        # Subject Branch Project Status CR V

        Activity

          People

            janichol Andy Nichols
            janichol Andy Nichols
            Pasi Keränen Pasi Keränen
            Andy Nichols Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2 weeks, 3 minutes
                2w 3m
                Remaining:
                Remaining Estimate - 2 weeks, 3 minutes
                2w 3m
                Logged:
                Time Spent - Not Specified
                Not Specified

                Gerrit Reviews

                  There are no open Gerrit changes