equirectUV
Converts a 3D direction vector into 2D UV coordinates for an equirectangular (panoramic) texture map.
Core Advantages
Abstracts complex trigonometric math (atan/asin) into a single, semantically clear node, greatly improving the readability and reliability of environment mapping code.
Common Uses
Rendering Skyboxes/Scene Backgrounds
Implementing Environment Reflections
Image-Based Lighting (IBL)
Procedural Sky Distortion Effects
How to adjust
This node itself is not adjustable; its effect is controlled entirely by changing its input `directionNode` (a 3D direction vector). For example, switching the input from `reflectNode` (for reflections) to `normalWorld` (for lighting) changes its purpose from calculating reflections to calculating ambient light. For advanced effects, you can perturb the input vector with a noise node to simulate dynamic distortions like water ripples on a reflective surface.
Code Examples
1// Look up a color in an equirectangular environment map using a reflection vector
2const reflectedColor = texture( envMap, equirectUV( reflectNode ) );