bitangentLocal
Provides the processed bitangent vector in local space, ready to be passed to the fragment shader, forming the basis of the TBN matrix for normal mapping.
Core Advantages
Its core advantage is that it fully automates the bitangent calculation (`cross(normal, tangent)`) and its transfer from vertex to fragment shader, freeing developers from manual vector math and varying interpolation.
Common Uses
As a cornerstone for building the TBN matrix to correctly apply normal maps.
Providing a local axis on the surface for parallax mapping to create depth illusions.
Defining the direction of stretched highlights in anisotropic lighting.
Debugging a model's UV and tangent generation by visualizing its value as a color.
How to adjust
The node's value is indirectly determined by the model's UV layout. Adjusting the model's UVs (e.g., rotating the UV map by 90 degrees) will directly change the direction of `bitangentLocal`, thus affecting all tangent-space effects like the orientation of a normal map.
Code Examples
1// Visualize the bitangent vector as a color for debugging
2// The color on the model's surface will reveal the bitangent's direction
3output.color.rgb = bitangentLocal.mul( 0.5 ).add( 0.5 );