Skip to content

Commit 5749b28

Browse files
markg-unityEvergreen
authored andcommitted
DOCG-7115 Improve Scene Depth Difference node docs
1 parent ec66f18 commit 5749b28

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# Scene Depth Difference
1+
# Scene Depth Difference node
22

3-
## Description
4-
5-
Provide a difference between a World Space Position and a Depth value for a given UV.
3+
The Scene Depth Difference node returns the difference in depth between a world space position and a value from the depth buffer.
64

75
## Ports
86

9-
| Name | Direction | Type | Binding | Description |
10-
|:-------|:-----------|:------|:--------|:------------|
11-
| Scene UV | Input | Vector4 | None | UV where to sample the depth. |
12-
| Position WS | Input | Vector3 | None | The world space position to compare with scene depth. |
13-
| Out | Output | Float | None | The difference between PositionWS and the depth. The difference is given relative to camera with **Eye** mode, in depth-buffer-value with **Raw** mode and in Linear value remap between 0 and 1 with the **Linear01** Mode. |
7+
| **Name** | **Direction** | **Type** | **Binding** | **Description** |
8+
|-|-|-|-|-|
9+
| **Scene UV** | Input | Vector 4 | None | Sets the normalized coordinates at which to fetch the scene depth from the depth buffer. The default is the normalized x, y coordinates of the fragment in screen space. For more information about the options, refer to the [Screen Position node](Screen-Position-Node.md). |
10+
| **Position WS** | Input | Vector 3 | None | Sets the world space position to compare the depth value at **Scene UV** to. The default is the x, y, z position of the fragment in world space. |
11+
| **Out** | Output | Float | None | The difference in depth between **Scene UV** and **Position WS**. The value depends on the **Sampling mode** property. The distance is negative if the depth value from **Scene UV** is closer to the camera than the depth from **Position WS**. |
1412

15-
## Controls
13+
## Sampling modes
1614

17-
| Name | Type | Options | Description |
18-
|:------------ |:-------------|:-----|:---|
19-
| Mode | Dropdown | Select **Linear01** to have a value between 0 and 1, **Eye** to have a World-Space value comparable to unit used on the scene and **Raw** if it's used with SceneDepthBuffer. |
15+
| **Name** | **Description** |
16+
|----------|------------------------------------|
17+
| **Linear 01** | Returns the distance in linear normalized space. The minimum distance is 0, and the maximum distance is 1. |
18+
| **Raw** | Returns the distance in the non-linear space the depth buffer uses. The minimum distance is 0, and the maximum distance is 1. |
19+
| **Eye** | Returns the distance in meters. |

0 commit comments

Comments
 (0)