bitangentGeometry
Provides the bitangent vector in TSL, which, along with the normal and tangent, forms the tangent space (TBN matrix) essential for advanced shading techniques like normal mapping.
Core Advantages
Fully automates the complex process of retrieving or calculating the bitangent (including fallbacks and cross-shader passing), allowing developers to reliably and easily implement advanced shading effects without handling the underlying math.
Common Uses
Normal Mapping (core use)
Parallax Mapping
Anisotropic Lighting
Flow Mapping
Debugging TBN vectors
How to adjust
The node itself is read-only; its effect is altered by changing the model's source data, especially the UV layout. For example, rotating a model's UV map by 90 degrees will change the bitangent's direction, causing vertical details in a normal map to be incorrectly rendered horizontally.
Code Examples
1// Visualize the bitangent vector as a color for debugging
2material.colorNode = bitangentGeometry.mul(0.5).add(0.5);