Get Position: Difference between revisions

From Terragen Documentation from Planetside Software
Jump to navigation Jump to search
Line 6: Line 6:
Provides the Position, in world space, of the current [[Render State]]. The [[Render State]] is affected by any shaders which were called before this function is called, among other things. Position is the current point on/in the surface/volume being rendered or sampled.
Provides the Position, in world space, of the current [[Render State]]. The [[Render State]] is affected by any shaders which were called before this function is called, among other things. Position is the current point on/in the surface/volume being rendered or sampled.


When used in the context of displacement, for example using Get Position in a function network that feeds a displacement shader, Position depends on where the node is connected with respect to other displacement shaders. This is because displacement shaders modify Position immediately.
When used in the context of displacement, for example in a function network that feeds a displacement shader, Position depends on where the node is connected with respect to other displacement shaders. This is because displacement shaders modify Position immediately.


When used in the context of providing colour and lighting to a surface, for example using Get Position in a function network that feeds a shader's colour or luminosity, Position is always the "final position" after all displacement. This is because all displacements are performed before any shader's colour and lighting is calculated.
When used in the context of providing colour and lighting to a surface, for example in a function network that feeds a shader's colour or luminosity, Position is always the "final position" after all displacement. This is because all displacements are performed before any shader's colour and lighting is calculated.


The Input connection is not used by this node.
The Input connection is not used by this node.

Revision as of 00:54, 2 May 2011

Get Position

Get Position

Provides the Position, in world space, of the current Render State. The Render State is affected by any shaders which were called before this function is called, among other things. Position is the current point on/in the surface/volume being rendered or sampled.

When used in the context of displacement, for example in a function network that feeds a displacement shader, Position depends on where the node is connected with respect to other displacement shaders. This is because displacement shaders modify Position immediately.

When used in the context of providing colour and lighting to a surface, for example in a function network that feeds a shader's colour or luminosity, Position is always the "final position" after all displacement. This is because all displacements are performed before any shader's colour and lighting is calculated.

The Input connection is not used by this node.