Add agx_white, agx_contrast and HDR support to the AgX tonemapper.

Also optimize all tonemappers to perform less calculations per-pixel.

Note: unlike `white`, `agx_white` is limited to a minimum of `2.0` and defaults to `16.29`. When using a RGB10A2 render buffer, `agx_white` will be ignored and a value of `2.0` will be used instead to ensure good behavior on the Mobile renderer.
This commit is contained in:
Allen Pestaluky 2025-05-29 12:19:00 -04:00
parent 7a228b4b91
commit 628df323e2
24 changed files with 546 additions and 241 deletions

View file

@ -1240,9 +1240,10 @@ public:
// Tonemap
PASS4(environment_set_tonemap, RID, RS::EnvironmentToneMapper, float, float)
PASS2(environment_set_tonemap_agx_contrast, RID, float)
PASS1RC(RS::EnvironmentToneMapper, environment_get_tone_mapper, RID)
PASS1RC(float, environment_get_exposure, RID)
PASS1RC(float, environment_get_white, RID)
PASS2RC(float, environment_get_white, RID, bool)
// Fog
PASS11(environment_set_fog, RID, bool, const Color &, float, float, float, float, float, float, float, RS::EnvironmentFogMode)