linearToneMapping
The `linearToneMapping` node provides the most basic and performant tone mapping algorithm. It converts High Dynamic Range (HDR) colors to the Low Dynamic Range (LDR) suitable for displays by linearly scaling the color (exposure) and clamping the result to the [0, 1] range.
Core Advantages
Extreme performance and predictable simplicity. Its algorithm has the lowest computational cost, making it ideal for performance-sensitive applications. Its linear exposure control is intuitive, and while it results in hard clipping of highlight details, this also makes it a useful tool for debugging lighting or achieving specific stylized looks.
Common Uses
Performance-First Applications
Lighting & Material Debugging
Stylized & Non-Photorealistic Rendering
How to adjust
The effect is controlled entirely by the single `exposure` parameter. Increasing this value linearly brightens the entire image, but can cause highlight areas to "clip" to pure white, losing detail (overexposure). Decreasing it darkens the image, which can help reveal details in previously blown-out areas.
Code Examples
1// Define a uniform to control the exposure
2const exposure = uniform(1.0);
3
4// Call the linearToneMapping node to process the HDR color
5// It multiplies the color by the exposure, then clamps the result to [0, 1]
6const ldrColor = linearToneMapping(hdrColor, exposure);