normalLocal
Provides the original, untransformed vertex normal in the model's local space. It safely handles cases where geometry lacks normal data.
Core Advantages
Its core advantage is robustness. If a geometry is missing normal data, it won't crash the shader but will return a default up-vector (0, 1, 0) and issue a warning, greatly simplifying debugging.
Common Uses
As the starting point for all lighting calculations to derive world or view space normals.
Implementing procedural effects that depend on the model's own coordinate system, like a snow effect.
Quickly debugging and identifying model data issues with its built-in warning for missing normal attributes.
How to adjust
This is a read-only input node, but its output can be processed by other nodes, such as `abs()` to create symmetrical, crystal-like visuals, or `mix()` to blend with other vectors for stylized shading.
Code Examples
1// Map the local normal to the color range for visualization
2output.color.rgb = normalLocal.mul( 0.5 ).add( 0.5 );