toneMappingExposure
A TSL node that automatically and directly accesses the global `renderer.toneMappingExposure` value set in JavaScript from within the shader.
Core Advantages
Seamlessly synchronizes shader appearance with the global exposure setting in JavaScript without needing to manually create and update uniforms, greatly simplifying code and ensuring state consistency.
Common Uses
As the standard exposure input for the `toneMapping` function to achieve global exposure control.
Used as a global brightness factor in custom effects (like bloom, volumetric light) to ensure the effect syncs with scene brightness.
In auto-exposure systems, to receive and apply dynamic exposure values calculated in JavaScript.
How to adjust
This node is not directly adjustable; its effect is entirely controlled by modifying the `renderer.toneMappingExposure` property in JavaScript. For example, setting `renderer.toneMappingExposure = 2.0` will double the overall image brightness.
Code Examples
1// It automatically reads the value of renderer.toneMappingExposure
2const toneMappedColor = toneMapping(
3 renderer.toneMapping, // Use the renderer's global algorithm
4 toneMappingExposure, // Use the renderer's global exposure node
5 viewportTexture
6);