|
1 | | -# Position Node |
| 1 | +# Position node |
2 | 2 |
|
3 | | -## Description |
4 | | - |
5 | | -Provides access to the mesh vertex's or fragment's **Position**, depending on the effective [Shader Stage](Shader-Stage.md) of the graph section that the [Node](Node.md) is part of. Use the **Space** drop-down parameter to select the coordinate space of the output value. |
| 3 | +The Position node returns the position of a vertex or fragment of a mesh. |
6 | 4 |
|
7 | 5 | ## Ports |
8 | 6 |
|
9 | | -| Name | Direction | Type | Binding | Description | |
| 7 | +| **Name** | **Direction** | **Type** | **Binding** | **Description** | |
10 | 8 | |:------------ |:-------------|:-----|:---|:---| |
11 | | -| Out | Output | Vector 3 | None | **Position** for the Mesh Vertex/Fragment. | |
12 | | - |
13 | | -## Controls |
14 | | - |
15 | | -| Name | Type | Options | Description | |
16 | | -|:------------ |:-------------|:-----|:---| |
17 | | -| Space | Dropdown | Object, View, World, Tangent, Absolute World | Selects the coordinate space of **Position** to output. | |
18 | | - |
19 | | -## World and Absolute World |
20 | | -The Position Node provides drop-down options for both **World** and **Absolute World** space positions. The **Absolute World** option always returns the absolute world position of the object in the Scene for all Scriptable Render Pipelines. The **World** option returns the default world space of the selected Scriptable Render Pipeline. |
21 | | - |
22 | | -The [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html) uses [Camera Relative](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?preview=1&subfolder=/manual/Camera-Relative-Rendering.html) as its default world space. |
| 9 | +| **Out** | Output | Vector 3 | None | Position of the vertex or fragment of the mesh, depending on the [shader stage](Shader-Stage.md) of the graph section. | |
23 | 10 |
|
24 | | -The [Universal Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html) uses **Absolute World** as its default world space. |
| 11 | +## Space |
25 | 12 |
|
26 | | -### Upgrading from previous versions |
27 | | -If you use a Position Node in **World** space on a graph authored in Shader Graph version 6.7.0 or earlier, it automatically upgrades the selection to **Absolute World**. This ensures that the calculations on your graph remain accurate to your expectations, since the **World** output might change. |
| 13 | +The **Space** dropdown determines the coordinate space of the output position. |
28 | 14 |
|
29 | | -If you use a Position Node in **World** space in the High Definition Render Pipeline to manually calculate [Camera Relative](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?preview=1&subfolder=/manual/Camera-Relative-Rendering.html) world space, you can now change your node from **Absolute World** to **World**, which lets you use [Camera Relative](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?preview=1&subfolder=/manual/Camera-Relative-Rendering.html) world space out of the box. |
| 15 | +| **Options** | **Description** | |
| 16 | +|-|-| |
| 17 | +| **Object** | Returns the vertex or fragment position relative to the origin of the object. | |
| 18 | +| **View** | Returns the vertex or fragment position relative to the camera, in meters. | |
| 19 | +| **World** | Returns the vertex or fragment position in the world, in meters. If you use the High Definition Render Pipeline (HDRP), **World** returns the position [relative to the camera](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?preview=1&subfolder=/manual/Camera-Relative-Rendering.html). | |
| 20 | +| **Tangent** | Returns the vertex or fragment position relative to the tangent of the surface, in meters. For more information, refer to [Normal maps](https://docs.unity3d.com/6000.3/Documentation/Manual/StandardShaderMaterialParameterNormalMapLanding.html). | |
| 21 | +| **Absolute World**| Returns the vertex or fragment position in the world, in meters. | |
0 commit comments