The following table lists the render passes the Deferred rendering pathThe technique that a render pipeline uses to render graphics. Choosing a different rendering path affects how lighting and shading are calculated. Some rendering paths are more suited to different platforms and hardware than others. More info
See in Glossary uses.
Render event | Render pass that occurs after the render event | Description |
---|---|---|
BeforeRendering | - | - |
BeforeRenderingShadows | - | - |
AfterRenderingShadows | - | - |
BeforeRenderingPrePasses | DepthPrepass, or DepthPrepass and DepthNormalPrepass. | Render depth and normal textures in a prepass, for materials that Unity renders in a Forward pass. |
AfterRenderingPrePasses | - | - |
BeforeRenderingGbuffer | GBufferPass | Render the G-Buffer, then copy the G-Buffer depth texture. |
AfterRenderingGbuffer | SSAO | Calculate the screen space ambient occlusionA method to approximate how much ambient light (light not coming from a specific direction) can hit a point on a surface. See in Glossary (SSAO) texture. Unity calculates this here only if you enable SSAO, and disable After Opaque. |
BeforeRenderingDeferredLights | Deferred Pass | Deferred rendering. Unity uses the SSAO texture during this render pass, if it was created. |
AfterRenderingDeferredLights | - | - |
BeforeRenderingOpaques | - | Render opaque forward-only materials. |
AfterRenderingOpaques | - | Calculate and blend the screen space ambient occlusion (SSAO) texture. Unity calculates this here only if you enable SSAO, and enable After Opaque. |
BeforeRenderingSkybox | - | - |
AfterRenderingSkybox | - | - |
BeforeRenderingTransparents | - | - |
AfterRenderingTransparents | - | - |
BeforeRenderingPostProcessing | - | - |
AfterRenderingPostProcessing | - | - |
AfterRendering | - | - |
For the full list of render events, and injection points for custom render passes, refer to Injection points reference for URP.
The following table lists the files that contain code related to the Deferred rendering path, located in the com.unity.render-pipelines.universal
folder.
File path | Description |
---|---|
Runtime\DeferredLights.cs |
The main class that handles the Deferred rendering path. |
Runtime\Passes\GBufferPass.cs |
ScriptableRenderPass for the G-Buffer pass. |
Runtime\Passes\DeferredPass.cs |
ScriptableRenderPass for the deferred shadingA rendering path in the Built-in Render Pipeline that places no limit on the number of Lights that can affect a GameObject. All Lights are evaluated per-pixel, which means that they all interact correctly with normal maps and so on. Additionally, all Lights can have cookies and shadows. More infoSee in Glossary pass. |
Shaders\Utils\Deferred.hlsl |
Utility functions for deferred shading. |
Shaders\Utils\StencilDeferred.shader |
ShaderA program that runs on the GPU. More info See in Glossary asset for deferred shading. |
Shaders\Utils\UnityGBuffer.hlsl |
Utility functions for storing and loading material properties from the G-Buffer. |