auto-exposure: spatial center-weighting, tunable mid-gray/max-exposure; psycho17 as default#32
Merged
Merged
Conversation
Change peak luminance value for psycho17 operator from 4.0 to 1.0.
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)Resolve pass (
auto_exposure.comp.slang)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.targetAdaptedYfis now a push constant (cb.targetAdaptedYf) instead of a compile-time constant, allowing runtime adjustment.maxExposureclamp is applied torawTargetExposurebefore the temporal blend, preventing integrator wind-up against the cap.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(default0.18) — mid-gray adaptation target. Raise to bias the image brighter, lower to darken.rtx.autoExposure.maxExposure(default8.0) — hard ceiling on the auto-exposure multiplier. Prevents dark rooms from being blown to mid-gray.ToneMappingAutoExposureArgs(replacing the three padding fields).Tonemap operator changes
NonetoPsycho17.