bentNormalView
bentNormalView
Programmatically calculates a 'bent' normal to simulate anisotropic materials (like brushed metal or silk) by creating stretched specular highlights.
Core Advantages
Achieves physically-realistic anisotropic effects (like stretched highlights) procedurally without requiring extra anisotropy maps, and integrates seamlessly into the PBR workflow.
Common Uses
Rendering brushed metal surfaces
Simulating varnished wood or bamboo
Representing fabrics like carbon fiber or silk
How to adjust
Primarily adjusted by controlling the material's `anisotropy` property (0 to 1) to set the highlight stretching intensity, and by assigning a direction vector (typically `tangentView`) to the `anisotropyB` node to define the stretch direction.
Code Examples
1// 1. Set anisotropy strength and direction
2material.anisotropy = float( 1.0 );
3anisotropyB.assign( tangentView );
4
5// 2. Assign bentNormalView to the material to activate the effect
6material.bentNormal = bentNormalView;