% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/render_tonemap.R
\name{render_tonemap}
\alias{render_tonemap}
\title{Render Tonemap}
\usage{
render_tonemap(
  image,
  method = c("raw", "reinhard", "uncharted", "hbd"),
  exposure_bias = 2,
  W = 11.2,
  filename = NULL,
  preview = FALSE
)
}
\arguments{
\item{image}{Default \code{NULL}. 3/4-channel array, \code{rayimg}, or filename.}

\item{method}{Default \code{raw}. One of \code{"raw"}, \code{"reinhard"}, \code{"uncharted"}, \code{"hbd"}.
Chooses the global tone-mapping curve. \code{"raw"} leaves the image unchanged.
\code{"reinhard"} applies a classic shoulder that gently compresses highlights.
\code{"uncharted"} (Hable filmic) gives a film-style toe/shoulder and keeps mid-tones contrasty.
\code{"hbd"} is a fast filmic-like curve with a soft toe/shoulder.
All methods operate on \strong{linear RGB} and return \strong{display-referred linear} (no OETF).}

\item{exposure_bias}{Default \code{2}. Only for \code{"uncharted"}.
Scalar applied to the linear RGB channels \strong{before} the Uncharted/Hable curve
(i.e., a pre-curve exposure gain). Values >1 brighten; <1 darken.
\code{exposure_bias=2} is about +1 stop; \code{0.5} is about -1 stop.}

\item{W}{Default \code{11.2}. White (linear scene value) that maps to 1.0 \strong{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.}

\item{filename}{Default \code{NULL}. Output path.}

\item{preview}{Default \code{FALSE}. Show result.}
}
\value{
A \code{rayimg} RGBA array.
}
\description{
Reinhard / Uncharted(Hable) / HBD operators in linear
}
\examples{
# 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)
}
