anisotropyB
Creates a `vec3` parameter named `AnisotropyB` in the TSL shader to precisely define the "direction" of anisotropic highlight stretching, typically representing the surface tangent or bitangent.
Core Advantages
Decouples the anisotropic effect's direction from the model's static vertex data, empowering developers to programmatically and dynamically control the highlight orientation with a vector, and also to quickly fix incorrect model tangent data.
Common Uses
Adding a uniform brushed direction to procedural geometries.
Creating magical surfaces where the sheen's flow changes with user interaction (e.g., mouse).
Simulating stylized effects like fur combed in a single direction.
As an override tool to correct incorrect highlight directions from a model.
How to adjust
Modify the `material.anisotropyB` value (a `THREE.Vector3`) in JavaScript. The highlight will stretch in a direction perpendicular to this vector. For example, setting the vector to the X-axis `(1,0,0)` will stretch the highlight along the Z-axis. Animating this vector will cause the highlight streak to rotate accordingly.
Code Examples
1// Connect the anisotropyB node to the material's anisotropy direction input
2// Its value is controlled by material.anisotropyB (a Vector3) in JS
3material.anisotropyBNode = anisotropyB;