TBNViewMatrix
Creates a transformation matrix that converts vectors from View Space to Tangent Space, essential for advanced effects like normal mapping.
Core Advantages
Encapsulates the complex linear algebra of building a TBN matrix (fetching, transforming, cross-product, assembly) into a single node, greatly improving code readability and standardization, allowing developers to focus on the effect itself rather than the underlying math.
Common Uses
Normal Mapping
Parallax Mapping
Anisotropic Specular
Procedural Surface Flow Effects
How to adjust
The node's value is determined by model geometry (normal, tangent) and camera view; it cannot be "adjusted" directly. Its effect is decisive: when used correctly, it enables realistic bump and lighting for normal maps. If its inputs are incorrect (e.g., bitangent calculation is inverted), the lighting effect will be flipped (dents appear as bumps).
Code Examples
1// Transform a view-space light vector to tangent-space to interact with a normal map
2const lightDirectionTS = TBNViewMatrix.mul( lightDirectionView );