Firstborn/Library/PackageCache/com.unity.postprocessing@3.2.2/Documentation~/Deferred-Fog.md

28 lines
1.8 KiB
Markdown
Raw Normal View History

2023-03-28 13:24:16 -04:00
# Deferred Fog
The **Deferred Fog** effect simulates the look of fog or mist in outdoor environments. To do this, it overlays a color onto objects depending on how far away they are from the Camera.
![screenshot-fog](/images/screenshot-fog.png)
You can also use the Deferred fog effect to hide object clipping. This is useful if you want to bring the Cameras far clip plane forward to improve performance.
The **Deferred Fog** effect creates a screen-space fog based on the cameras [depth texture](https://docs.unity3d.com/Manual/SL-DepthTextures.html). It supports Linear, Exponential and Exponential Squared fog types. **Deferred Fog** settings are on the **Scene** tab of the [**Lighting window**](https://docs.unity3d.com/Manual/lighting-window.html) in **Window > Rendering > Lighting Settings**.
### Properties
![](images/deferredfog.png)
| Property | Function |
| :-------------- | :--------------------------------- |
| Enabled | Enable this checkbox to turn the **Deferred Fog** effect on.|
| Exclude Skybox | Enable this checkbox to exclude fog from the [skybox](https://docs.unity3d.com/Manual/class-Skybox.html). |
### Details
The **Deferred Fog** effect only appears in your [**Post-process Layer**](https://docs.unity3d.com/Packages/com.unity.postprocessing@latest?subfolder=/manual/Quick-start.html#post-process-layer) if the camera is set to render with the [**Deferred rendering path**](https://docs.unity3d.com/Manual/RenderTech-DeferredShading.html). It is enabled by default and adds the support of **Deferred Fog** from the [**Lighting window**](https://docs.unity3d.com/Manual/lighting-window.html), which would otherwise only work with the [**Forward rendering path**](https://docs.unity3d.com/Manual/RenderTech-ForwardRendering.html).
### Requirements
- Depth texture
- Shader Model 3