|
1 | | -# HD Scene Color Node |
| 1 | +# HD Scene Color node |
2 | 2 |
|
3 | | -The HD Scene Color Node does the same thing as the Scene Color Node, but allows you to access the mips of the color buffer. |
| 3 | +The HD Scene Color node samples the color buffer of the current camera, using the screen space coordinates you input. The node works the same way as the [Scene Color Node](Scene-Color-Node.md) but returns the mipmap levels of the color buffer. |
4 | 4 |
|
5 | | -## Render pipeline compatibility |
| 5 | +To make sure the HD Scene Color node outputs the correct values, follow these steps: |
6 | 6 |
|
7 | | -| **Node** | **Universal Render Pipeline (URP)** | **High Definition Render Pipeline (HDRP)** | |
8 | | -| -------------- | ----------------------------------- | ------------------------------------------ | |
9 | | -| HD Scene Color | No | Yes | |
| 7 | +1. Connect the node to the fragment [shader stage](Shader-Stage.md). The HD Scene Color node doesn't support the vertex shader stage. |
| 8 | +2. In the **Graph Settings** tab of the [**Graph Inspector**](Internal-inspector.md) window, set **Surface Type** to **Transparent**. Otherwise, the node samples the color buffer before Unity renders all the opaque contents in the scene. |
| 9 | + |
| 10 | +The node uses trilinear clamp mode to sample the color buffer, so it smoothly interpolates between the mipmap levels. |
| 11 | + |
| 12 | +## Render pipeline support |
| 13 | + |
| 14 | +The HD Scene Color node supports the High Definition Render Pipeline (HDRP) only. If you use the node with an unsupported pipeline, it returns 0 (black). |
| 15 | + |
| 16 | +If you use your own custom render pipeline, you must define the behavior of the node yourself. Otherwise, the node returns a value of 0 (black). |
10 | 17 |
|
11 | 18 | ## Ports |
12 | 19 |
|
13 | | -| Name | Direction | Type | Binding | Description | |
14 | | -|:------------ |:-------------|:-----|:---|:---| |
15 | | -| **UV** | Input | Vector 4 | Screen Position | Sets the normalized screen coordinates to sample. | |
16 | | -| **Lod** | Input | float | None | Sets the mip level that the sampler uses to sample the color buffer. | |
17 | | -| **Output** | Output | Vector 3 | None | Output value | |
| 20 | +| Name | Direction | Type | Binding | Description | |
| 21 | +|:--|:--|:--|:--|:--| |
| 22 | +| **UV** | Input | Vector 4 | Screen position | The normalized screen space coordinates to sample from. | |
| 23 | +| **Lod** | Input | float | None | The mipmap level to sample. | |
| 24 | +| **Output** | Output | Vector 3 | None | The color value from the color buffer at the coordinates and mipmap level. | |
| 25 | + |
| 26 | +## Properties |
18 | 27 |
|
19 | | -## Notes |
20 | | -### Exposure |
| 28 | +| **Property** | **Description** | |
| 29 | +|-|-| |
| 30 | +| **Exposure** | Applies [exposure](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html?subfolder=/manual/Override-Exposure.html) to the camera color. This property is disabled by default to avoid double exposure. | |
21 | 31 |
|
22 | | -You can use the Exposure property to specify if you want to output the Camera color with exposure applied or not. By default, this property is disabled to avoid double exposure. |
| 32 | +## Additional resources |
23 | 33 |
|
24 | | -The sampler that this Node uses to sample the color buffer is in trilinear clamp mode. This allows the sampler to smoothly interpolate between the mip maps. |
| 34 | +- [Scene Color Node](Scene-Color-Node.md) |
| 35 | +- [Custom pass buffers and pyramids](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html?subfolder=/manual/Custom-Pass-buffers-pyramids.html) |
0 commit comments