materialAnisotropyVector
Converts the user-set anisotropy strength and rotation angle into the 2D direction vector required by the underlying lighting model.
Core Advantages
Fully encapsulates the conversion logic from polar (strength, angle) to Cartesian (vector) coordinates, keeping the high-level API intuitive while providing the shader with the precise data format it needs.
Common Uses
As an internal calculation unit for materials like `MeshStandardNodeMaterial`; not used directly by developers.
Automatically converts `material.anisotropy` and `material.anisotropyRotation` into a vector in the background.
Provides mathematical input for internal lighting functions like aGGX.
How to adjust
This node is not configured directly. Its output is determined by `material.anisotropy` (controlling the vector's length) and `material.anisotropyRotation` (controlling its angle). Changing these values indirectly alters the node's 2D vector output, thus affecting the highlight's stretch intensity and direction.
Code Examples
1// This node internally performs a conversion logic similar to the following:
2const angle = material.anisotropyRotation;
3const length = material.anisotropy;
4
5const anisotropyVec = vec2(
6 length.mul( cos( angle ) ),
7 length.mul( sin( angle ) )
8);