positionGeometry
Provides the original, untransformed vertex positions of a model in its local (object) space within TSL, serving as the starting point for all vertex-based effects.
Core Advantages
It's the core bridge to raw geometry data and greatly improves shader clarity and robustness by using explicit coordinate space naming (unlike positionWorld, etc.), reducing confusion.
Common Uses
Vertex Displacement (e.g., water surfaces, flags)
Procedural Shading (e.g., height-based color gradients)
Model dissolve or build-up effects
How to adjust
The node itself is read-only, but its output can be used in various mathematical operations. For example, using its Y-component as a color creates a gradient; adding a sine wave produces a wave effect; or multiplying by its distance from the origin can create an explosion/scaling effect.
Code Examples
1// Calculate a vertical offset based on the X coordinate and time
2const waveHeight = sin( positionGeometry.x.mul(4).add(time) ).mul(0.2);
3
4// Add the offset to the original Y coordinate to create the new vertex position
5const displacedPosition = vec3(
6 positionGeometry.x,
7 positionGeometry.y.add(waveHeight),
8 positionGeometry.z
9);