Skip to content

auto-exposure: spatial center-weighting, tunable mid-gray/max-exposure; psycho17 as default#32

Merged
Kim2091 merged 3 commits into
RemixProjGroup:mainfrom
TheGreatHMMMM:plus-ae
May 21, 2026
Merged

auto-exposure: spatial center-weighting, tunable mid-gray/max-exposure; psycho17 as default#32
Kim2091 merged 3 commits into
RemixProjGroup:mainfrom
TheGreatHMMMM:plus-ae

Conversation

@TheGreatHMMMM

Copy link
Copy Markdown
Collaborator

Summary

Replaces per-bin log-space Gaussian weighting in the resolve pass with spatial Gaussian center-weighting applied in the histogram pass. Adds two new user-tunable controls (targetAdaptedYf, maxExposure). Sets Psycho17 as the default tonemap operator.

Auto-exposure changes

Spatial center-weighting (auto_exposure_histogram.comp.slang)

  • Each pixel contributes a Gaussian-weighted count to its histogram bin based on its distance from the screen centre (σ = 0.25 × short axis, fixed-point scale 256, minimum weight 1). Peripheral pixels still register, but the adaptation is biased toward the subject at the centre of gaze — matching real camera center-weighted metering.

Resolve pass (auto_exposure.comp.slang)

  • Removed the per-bin log-space Gaussian (kGaussianSigmaStops, kGaussianLogCenter, kGaussianInvTwoSigmaSq, kTargetAdaptedYf). Bin counts from the histogram pass already carry the spatial weighting; the resolve now does a plain count-weighted log mean.
  • targetAdaptedYf is now a push constant (cb.targetAdaptedYf) instead of a compile-time constant, allowing runtime adjustment.
  • maxExposure clamp is applied to rawTargetExposure before the temporal blend, preventing integrator wind-up against the cap.
  • Debug histogram normalization uses float(cb.numPixels) instead of the hard-coded 10,000.

New RTX options (rtx_auto_exposure.h, rtx_auto_exposure.cpp, tonemapping.h)

  • rtx.autoExposure.targetAdaptedYf (default 0.18) — mid-gray adaptation target. Raise to bias the image brighter, lower to darken.
  • rtx.autoExposure.maxExposure (default 8.0) — hard ceiling on the auto-exposure multiplier. Prevents dark rooms from being blown to mid-gray.
  • Both are exposed as ImGui sliders and packed into ToneMappingAutoExposureArgs (replacing the three padding fields).

Tonemap operator changes

  • Default operator changed from None to Psycho17.

TheGreatHMMMM and others added 3 commits May 21, 2026 02:37
Change peak luminance value for psycho17 operator from 4.0 to 1.0.
@Kim2091 Kim2091 merged commit 4caccab into RemixProjGroup:main May 21, 2026
3 checks passed
Kim2091 added a commit that referenced this pull request May 24, 2026
…ault

Auto-exposure overhaul that lands as PR #32. Two main shifts:

* Spatial center-weighting — the histogram input is now weighted
  by a center-biased mask (Gaussian falloff from the frame center)
  so off-center bright objects (sky in the corner, etc.) don't
  drag the exposure target down. The mask is tunable but the
  default approximates a 50mm photographic spot meter.
* psycho17 set as the default tone-curve operator (was AgX).
  psycho17 lands tonally close to ACES for sRGB output but with a
  more film-stock-like roll-off in highlights, which matches the
  cinematic look the project is targeting.

Knobs added:
* Tunable mid-gray target (default 0.18, matching photographic 18%
  gray).
* Tunable max-exposure cap so the auto-exposure can't blow out in
  dark scenes.

Yf-normalisation documented in the rtx_fork_tonemap header (was
implicit; spelled out so future contributors don't confuse Yf with
Y). fork-touchpoints index synced for the new entries.

Original commits: 4caccab..4010cfb (inclusive)
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.

2 participants