positionWorld
Provides the absolute position of a vertex in the global World Space, after its model's transformations have been applied.
Core Advantages
Its core advantage is providing a unified coordinate system for all scene elements (objects, lights, etc.) to interact, which is fundamental for standard lighting calculations and effects fixed to the world environment (like a water plane).
Common Uses
As the starting point for all lighting calculations to determine light direction and attenuation.
As 3D coordinates to sample procedural textures (like 3D noise) in world space, creating seamless effects across multiple objects.
Creating effects tied to world coordinates, such as simulating a coastline or snow layer based on world height (Y-axis).
How to adjust
This is a read-only node. Effects are created by comparing it to world-space constants (like a height or a central point), for example, to create a color gradient based on world height or to define a spherical 'force field' area.
Code Examples
1// Mix between water and land colors based on the world Y-position
2const landFactor = positionWorld.y.smoothstep( waterLevel - 0.1, waterLevel + 0.1 );
3output.color.rgb = mix( waterColor, landColor, landFactor );