Unity Products:Amplify Shader Editor/Object To Clip Pos
Jump to navigation
Jump to search
Object To Clip Pos Node
The Object To Clip Pos node transforms a position in object/local space to the camera’s clip space in homogeneous coordinates.
NOTE 1: Please notice that clip space coordinates differ between Direct3D-like and OpenGL-like platforms.
- Direct3D-like ( Direct3D, Metal and consoles ): Clip space depth ranges from 0.0 at the near plane to +1.0 at the far plane.
- OpenGL-like ( OpenGL and OpenGL ES ): Clip space depth ranges from –1.0 at the near plane to +1.0 at the far plane.
NOTE 2: We advise using either the Transform Position or Transform Direction as they are both more completes node that allow multiple transform setups.
Nodes used:
Vertex Position,
Object To Clip Pos,
Compute Grab Screen Pos,
Float,
Texture Sample,
Add,
Grab Screen Color
Node Parameter | Description | Default Value |
---|---|---|
Input | Position in Object/Local space to be transformed into camera clip space. Only visible if the respective input port is not connected. | 0,0,0 |
Input Port | Description | Type |
---|---|---|
Input | Position in Object/Local space to be transformed into camera clip space. | Float3 |
Output Port | Description | Type |
---|---|---|
XYZW | Returns the transformed position in clip space. | Float4 |
X | Returns only the X component of the transformed position in clip space. | Float |
Y | Returns only the Y component of the transformed position in clip space. | Float |
Z | Returns only the Z component of the transformed position in clip space. | Float |
W | Returns only the W component of the transformed position in clip space. | Float |