transformedTangentWorld
A read-only node that provides the Tangent vector in World Space. It's fundamental for building the world-space TBN coordinate system, essential for applying normal maps and anisotropic effects in a world-lighting environment.
Core Advantages
Enables tangent-space techniques like normal mapping and anisotropic lighting to work correctly within a world-space lighting pipeline, defining a world-aligned direction on the surface, which is a cornerstone for advanced world-space effects.
Common Uses
Building the TBN matrix in world space to apply normal maps.
Providing the "brush" direction for world-space anisotropic lighting.
Supplying a world-space direction field for surface flow effects (e.g., water currents).
How to adjust
This node is read-only; its value is determined by the geometry's UV layout (requires computed tangents) and the object's world transform. Rotating the object changes its value, but moving the camera does not. Modifying the model's UVs will change the tangent's direction.
Code Examples
1// Ensure the geometry has computed tangents (geometry.computeTangents())
2
3// Map the world-space tangent vector [-1, 1] to RGB color [0, 1] for visualization
4material.colorNode = transformedTangentWorld.xyz.mul( 0.5 ).add( 0.5 );