backgroundIntensity
Provides a standardized interface in TSL shaders to get the overall intensity of the scene's environment light (typically from a background texture), which is crucial for physically correct lighting.
Core Advantages
Automates and decouples the process of passing environment intensity. It allows developers to ensure a custom material's lighting response correctly matches the global environment brightness without manually syncing uniforms, greatly simplifying PBR workflows.
Common Uses
In custom PBR materials, multiply the sampled environment map color by this intensity to calculate physically correct indirect lighting.
Adjust the transmitted light brightness for refractive or transparent objects, syncing them with changes in environmental brightness.
Use as a global ambiance parameter in stylized rendering to control how characters or effects respond to environmental brightness.
For debugging and validating scene lighting setups by visually inspecting an object's brightness response curve.
How to adjust
The value of this node cannot be adjusted directly. You need to modify the `scene.backgroundIntensity` property (a float) in your JavaScript code. Increasing this value will simultaneously brighten both the scene background and the environmental lighting/reflections on all objects using this node, and vice versa.
Code Examples
1// Multiply the color sampled from the environment map by the background intensity
2const reflectedColor = texture( envMap, reflectionVector );
3const finalColor = reflectedColor.mul( backgroundIntensity );