bitangentWorld
Provides the bitangent vector correctly transformed into World Space, crucial for world-space effects like environment mapping.
Core Advantages
Its core advantage is encapsulating the complex local-to-world transformation, providing a direct and correct input for effects that interact with the world coordinate system, like environment mapping, greatly simplifying advanced rendering.
Common Uses
Building the world-space TBN matrix for environment mapping to calculate correct reflection vectors.
Providing world-aligned surface detail for planar reflections (e.g., mirrors, water).
Debugging local-to-world vector transformations by visualizing its value as a color.
How to adjust
This node's value is determined by the model's UVs and world transform. Its behavior is understood by comparing its visualization to `bitangentView`: when the object rotates, the `bitangentWorld` color rotates with it (tied to world orientation), but it remains unchanged when the camera moves.
Code Examples
1// Build the TBN matrix in world space
2const tbn = tbnWorld( normalWorld, tangentWorld, bitangentWorld );
3// Transform the normal from a normal map from tangent space to world space
4const detailNormal = tbn.mul( normalMapNode );