Reinhard / Uncharted(Hable) / HBD operators in linear
render_tonemap(
image,
method = c("raw", "reinhard", "uncharted", "hbd"),
exposure_bias = 2,
W = 11.2,
filename = NULL,
preview = FALSE
)Default NULL. 3/4-channel array, rayimg, or filename.
Default raw. One of "raw", "reinhard", "uncharted", "hbd".
Chooses the global tone-mapping curve. "raw" leaves the image unchanged.
"reinhard" applies a classic shoulder that gently compresses highlights.
"uncharted" (Hable filmic) gives a film-style toe/shoulder and keeps mid-tones contrasty.
"hbd" is a fast filmic-like curve with a soft toe/shoulder.
All methods operate on linear RGB and return display-referred linear (no OETF).
Default 2. Only for "uncharted".
Scalar applied to the linear RGB channels before the Uncharted/Hable curve
(i.e., a pre-curve exposure gain). Values >1 brighten; <1 darken.
exposure_bias=2 is about +1 stop; 0.5 is about −1 stop.
Default 11.2. White (linear scene value) that maps to 1.0 after
the Uncharted/Hable/Reinhard curve. Acts like a “white point” for the shoulder: larger values
preserve more highlight detail (later roll-off), smaller values roll off earlier and harder.
Default NULL. Output path.
Default FALSE. Show result.
A rayimg RGBA array.
# Plot unchanged image
render_tonemap(dragon, preview = TRUE)
# Plot Reinhard tonemapped image
render_tonemap(dragon, method = "reinhard", preview = TRUE)
# Plot Uncharted/Hable tonemapped image
render_tonemap(dragon, method = "uncharted",preview = TRUE)
# Plot Uncharted/Hable tonemapped image, white point adjusted
render_tonemap(dragon, method = "uncharted", W=11.4, preview = TRUE)
# Plot Uncharted/Hable tonemapped image, exposure adjusted
render_tonemap(dragon, method = "uncharted", exposure_bias = 1,preview = TRUE)
# Plot Hejl-Burgess-Dawson tonemapped image, exposure adjusted
render_tonemap(dragon, method = "hbd",preview = TRUE)