transformedTangentView
A read-only node that provides the Tangent vector in View Space. It's the cornerstone of the TBN coordinate system, essential for effects like normal mapping and anisotropic lighting.
Core Advantages
By providing the view-space aligned Tangent vector, it serves as the cornerstone for all tangent-space techniques (like normal mapping and anisotropic lighting) and defines a clear direction on the surface (typically along the U-axis of the UVs).
Common Uses
Building the TBN transform matrix to apply normal maps.
Defining the highlight stretch direction for anisotropic lighting (e.g., brushed metal).
Serving as a basis for coordinate transforms in advanced techniques like parallax mapping.
How to adjust
This node is read-only; its value is determined by the geometry's UV layout (which dictates the result of `computeTangents()`) and the object's transform. The node will be invalid if tangents are not computed on the geometry. 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 view-space tangent vector [-1, 1] to RGB color [0, 1] for visualization
4material.colorNode = transformedTangentView.mul( 0.5 ).add( 0.5 );