reflector
An automated node, used with the Reflector JS object, to easily create real-time, dynamic reflections on planar surfaces like mirrors and water.
Core Advantages
Completely encapsulates the virtual camera, render target, and shader logic required for real-time reflections, allowing developers to implement advanced dynamic reflections without managing low-level details.
Common Uses
Creating mirrors in architectural or interior designs.
Simulating reflections on calm lake or puddle surfaces.
Making polished floors in showrooms that reflect dynamic objects.
How to adjust
Control the effect by adjusting the options passed to the Reflector JS object's constructor. Lowering `textureWidth`/`textureHeight` improves performance but blurs the reflection; adjusting `clipBias` prevents self-reflection artifacts.
Code Examples
1// Pass the Reflector object from JS into the TSL node
2const reflectionColor = TSL.reflector( floorMirror );
3
4// Mix the reflection with a base color for tinted or imperfect reflections
5const blendedColor = TSL.mix( baseColor, reflectionColor, 0.9 );