backgroundBlurriness
Provides a standardized, auto-synced channel within a TSL shader to directly access the scene's global backgroundBlurriness property value.
Core Advantages
Decouples material logic from the application's render loop. Developers no longer need to manually create and update uniforms, allowing materials to automatically respond to global environment changes in a standardized, convenient, and auto-synced way.
Common Uses
Custom refractive materials (like frosted glass) to match their blur effect with the scene's background blur.
Controlling the Level of Detail (LOD) for reflections based on background blurriness to optimize performance for highly reflective materials.
Serving as a global artistic parameter to uniformly control the blur intensity of multiple UI elements or effects.
Synchronizing the blur appearance of custom shaders with standard materials (like MeshStandardMaterial) for visual harmony.
How to adjust
The value of this node cannot be adjusted directly. Instead, you modify the `scene.backgroundBlurriness` property (a float from 0 to 1) in your JavaScript code. Increasing this value will simultaneously intensify the blur of the scene's background and the effect of any property linked to the `backgroundBlurriness` node in the shader (e.g., reflection roughness).
Code Examples
1// Directly link the material's roughness to the background blurriness
2const roughnessNode = backgroundBlurriness;
3
4// Use this roughness for environment map sampling to sync reflection blur with background blur
5const reflection = envMap( roughnessNode );