-
-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Description
Tested versions
Reproducible in all versions with the AgX tonemapper (4.4 beta 1 onward)
System information
Godot v4.4.beta2 - Windows 11 (build 22631) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 980 Ti (NVIDIA; 31.0.15.4665) - 13th Gen Intel(R) Core(TM) i7-13700K (24 threads)
Issue description
The intended AgX tone mapping curve has the following properties:
- Linear inputs of 0, 0.18, and
whiteshould result in linear outputs of 0, 0.18, and 1.0 respectively. - The curve between 0 and 0.18 should be a smooth concave curve
- The curve between 0.18 and
whiteshould be a smooth convex curve
Because the AgX implementation was created using a simple polynomial regression, oscillations can be seen in the output:
| AgX | Godot AgX Approximation |
|---|---|
![]() |
![]() |
![]() |
![]() |
This issue was not clearly visible with most of the test images, as many of those images were photos. Video games may use art styles composed of simple shapes and colours, which demonstrate this issue more clearly. The approximation creates banding on value transitions and decreases the saturation of colours:
| AgX | Godot AgX Approximation |
|---|---|
![]() |
![]() |
![]() |
![]() |
Additionally, not much performance benefit is gained by using the polynomial approximation, compared to optimizing the original curve maths, because the approximation is applied in normalized log2 space.
For comparison, the ACES approximation by Stephen Hill is applied in linear space and does not use a simple polynomial regression—this is immensely higher performance and results in a tone mapping curve that has no oscillations.
Steps to reproduce
Compile Godot using one of the exact AgX implementations found here and compare with Godot 4.4 beta 2.
Minimal reproduction project (MRP)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status







