Skip to content
Snippets Groups Projects

tone_mapping: add dynamic knee point adaptation tuning

Merged Niklas Haas requested to merge dynamic_adaptation_v3 into master

Based on how close the target knee point is towards the 'extreme' values (min/max knee), we raise the adaptation strength dynamically. Significantly improves visual appearance of very bright/dark scenes, especially the sulphur pools clip.

Merge request reports

Pipeline #378700 passed

Pipeline passed for 21b611ec on dynamic_adaptation_v3

Test coverage 79.96% (-0.01%) from 1 job

Merged by Niklas HaasNiklas Haas 1 year ago (Aug 28, 2023 1:52pm UTC)

Loading

Pipeline #378703 passed

Pipeline passed for 21b611ec on master

Test coverage 79.97% (-0.01%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Niklas Haas approved this merge request

    approved this merge request

  • merged

    • @haasn Hi! I'm currently looking through this implementation as i want to learn more about HDR->HDR tone mappings. It looks to me like this snippet has a flaw: pl_smoothstep(max_knee, def_knee, target) Shouldn't this be pl_smoothstep(def_knee, max_knee, target) instead? Greets..

    • Author Maintainer

      @toxie No. The intent is to have a "bathtub curve", which goes to 0 at the lower and upper bounds, but has a value of 1 at def_knee. pl_smoothstep(max_knee, def_knee, target) is a function that is 0 when target is close to max_knee, and smoothly goes towards 1 as target moves towards def_knee.

      Keep in mind that smoothstep(A, B, x) is valid for A > B, and in this case basically horizontally mirrors the overall shape of the curve.

    • @haasn Thanks a lot for the clarification, i guess i'm stuck too much in the GPU world, where smoothstep() has that case undefined (according to spec at least).

    • Author Maintainer

      @toxie huh, indeed it is - that's strange, given that the pseudocode they provide for the specification would works fine for edge1 < edge0 also. In fact, that's exactly the code we use..

    • Please register or sign in to reply
Please register or sign in to reply
Loading