Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve AgX tonemapping curve and update tonemapping docs. #102435

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

allenwp
Copy link
Contributor

@allenwp allenwp commented Feb 4, 2025

Not cherry-pickable to 4.3, as AgX is only in 4.4.

Draft State

I have left this PR in a draft state solely to reduce the review workload; I hope that I will be able to greatly improve performance with a new approximation of the AgX tonemapping curve in linear encoding, but it will take me at least a few more weeks of full-time research and trial-and-error to do this.

If the production team would prefer to review this PR as-is and merge it now, you're very welcome to! The new high performance approximation that I have in mind could be merged at a later time.

Tonemapping Curve

This PR changes the tonemapping curve to no longer be an approximate, but instead be an exact simplification of the original tonemapping curve of AgX. This addresses all of the issues described in #102416, while maintaining similar performance.

This PR Current Approximation
Image Image
Image Image
Image Image
Image Image

Performance

Using the visual profiler, Calinou's tonemapping test scene, ~4K window, and an NVIDIA 980 Ti on Windows 11, I recorded the following performance stats:

AgX (with white parameter): 1.35 ms
Tony McMapface: 1.29 ms
AgX (this PR): 1.22 ms
AgX (Godot 4.4 beta 2): 1.19 ms
ACES: 1.07 ms
Filmic: 1.0 ms
Rienhard: 0.93 ms
Linear: 0.82 ms

Docs

The docs changes make the tonemapper descriptions consistent with each other, making them easier to quickly compare. They follow this format:

  1. Description of tonemapping curve.
  2. Key properties and their impact on the resulting image.
  3. Performance characteristic relative to other tonemappers.
  4. Additional notes, if required.

I have also updated the white documentation along with this refresh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AgX: Oscillations in sigmoid approximation
1 participant