|
| constexpr double | rrt_and_odt_fit (const double value) |
| | Rational fit of the ACES RRT and sRGB ODT curve, by Stephen Hill.
|
| template<LinearRGBSpace Color> |
| constexpr Color | reinhard (const Color &color) |
| | Reinhard tonemapping, c / (1 + c) on each channel.
|
| template<LinearRGBSpace Color> |
| constexpr Color | reinhard_extended (const Color &color, const float white) |
| | Extended Reinhard tonemapping, c (1 + c / w²) / (1 + c) on each channel, which maps white to 1.
|
| template<LinearRGBSpace Color> |
| constexpr Color | aces_fitted (const Color &color) |
| | Fitted ACES tonemapping by Stephen Hill: an approximation of the ACES Reference Rendering Transform and sRGB Output Device Transform.
|
Tonemapping operators, from HDR linear light to the 0-1 range of a display.
template<LinearRGBSpace Color>
| Color aest::colors::tonemap::aces_fitted |
( |
const Color & | color | ) |
|
|
constexprexport |
Fitted ACES tonemapping by Stephen Hill: an approximation of the ACES Reference Rendering Transform and sRGB Output Device Transform.
The fit is defined on linear sRGB, so the color is converted to LinSRGB, mapped, clamped to [0, 1] and converted back: colors outside the sRGB gamut clip, as the fit targets an sRGB display. It raises contrast and desaturates highlights, like the full ACES transforms. Alpha is kept.
- Template Parameters
-
- Parameters
-
- Returns
- The tonemapped color, in the sRGB gamut with channels in [0, 1].
- See also
- BakingLab
Definition at line 111 of file Tonemap.cppm.
template<LinearRGBSpace Color>
| Color aest::colors::tonemap::reinhard |
( |
const Color & | color | ) |
|
|
constexprexport |
Reinhard tonemapping, c / (1 + c) on each channel.
Every channel goes from [0, ∞) into [0, 1), so the result never clips, but white is reached only at infinity. Working per channel, it also desaturates bright colors toward white. Alpha is kept.
- Template Parameters
-
- Parameters
-
- Returns
- The tonemapped color, every channel in [0, 1).
- See also
- Reinhard et al.
Definition at line 65 of file Tonemap.cppm.
template<LinearRGBSpace Color>
| Color aest::colors::tonemap::reinhard_extended |
( |
const Color & | color, |
|
|
const float | white ) |
|
constexprexport |
Extended Reinhard tonemapping, c (1 + c / w²) / (1 + c) on each channel, which maps white to 1.
Channels from 0 to white go into [0, 1]; brighter ones go above 1 and clip when encoded. Pick white as the brightest value of the scene, or the peak of the display over REFERENCE_WHITE_NITS. Alpha is kept.
- Template Parameters
-
- Parameters
-
| [in] | color | The HDR color |
| [in] | white | The linear value that becomes 1 |
- Returns
- The tonemapped color.
- Precondition
white is greater than 0.
- See also
- Reinhard et al.
Definition at line 87 of file Tonemap.cppm.