transformedNormalWorld
A read-only node representing the final, ready-for-lighting surface normal in World Space. It already incorporates all factors like normal maps, flat shading, etc.
Core Advantages
Allows all lighting and reflection calculations to be unified in world space, simplifying shader logic and providing the foundation for effects aligned with the world coordinate system (e.g., triplanar mapping, snow effects).
Common Uses
Providing the normal for world-space lighting models.
Supplying the directional basis for Triplanar Mapping.
Creating environment-aware procedural effects (e.g., snow accumulation on upward-facing surfaces).
How to adjust
This node is read-only; its value is determined by upstream inputs (like `material.normalNode`) and the object's world transform. Rotating the object changes its value, but moving the camera does not, proving its alignment with the world coordinate system.
Code Examples
1// Map the world-space normal [-1, 1] to RGB color [0, 1] for visualization
2const worldNormalColor = transformedNormalWorld.mul( 0.5 ).add( 0.5 );
3
4// Assign the calculated color as the model's final color output
5material.colorNode = worldNormalColor;