normalMap
Uses a normal map (a color texture storing direction information) to perturb surface normals, giving low-poly models high-fidelity bump details.
Core Advantages
Provides rich visual detail to low-poly models with high performance efficiency by decoupling fine surface information from geometry, a key technique for realism in real-time rendering.
Common Uses
Enhancing character and creature details (skin, armor)
Enriching environment and architectural surfaces (bricks, rocks)
Creating hard-surface model details (panel lines, bolts)
How to adjust
Adjust the `scaleNode` (a `vec2`) to control the bump intensity; if the bumps appear inverted, flip its Y component (e.g., `vec2(1, -1)`) to fix it. Modify the UV coordinates fed into the `texture` node (e.g., `uv().mul(5)`) to tile the normal map.
Code Examples
1// Define the final normal using a normal map texture and a scale value
2const finalNormal = normalMap( texture( normalTex ), normalScale );