rendererReference
rendererReference
Creates an automated data bridge between a `WebGLRenderer` property on the JavaScript side and a Uniform variable on the GPU side.
Core Advantages
Common Uses
Referencing `toneMappingExposure` for global exposure control.
Referencing custom renderer properties (e.g., `globalWind`) for scene-wide animations.
As a low-level building block for other TSL nodes to access renderer state.
How to adjust
Adjusted by directly modifying the referenced `WebGLRenderer` property's value in JavaScript. For example, changing `renderer.backgroundBlurriness` can control the blur intensity in a post-processing effect in real-time, or updating a custom `renderer.overlayColor` property can globally change the scene's tint.
Code Examples
1// Create a reference to the renderer's 'toneMappingExposure' property
2const exposure = rendererReference( 'toneMappingExposure', 'float' );
3
4// Multiply the material color by the exposure value
5const finalColor = materialColor.mul( exposure );