I am using Unity 2021.3.21f1 and URP 12.1.10
I’m writing my own URP Lit shader based on the standard URP Lit shader.
The standard URP Lit shader has the following passes: UniversalForward, ShadowCaster, UniversalGBuffer, DepthOnly, DepthNormals, Meta, Universal2D.
The question is: what are these passes and in what cases are they used in Unity?
I’m trying to figure out which passages I need right now and which ones I don’t yet.
-
With the UniversalForward pass, everything is clear - if it does not exist, then the 3D object will not be drawn at all.
-
ShadowCaster pass. It is also clear here - if it is not there, then the 3D object will not cast a shadow.
-
UniversalGBuffer pass. I did not understand why it is needed, although I read this URP ShaderLab Pass tags | Universal RP | 12.0.0
-
DepthOnly pass. I don’t understand why it is needed. If you remove it, the whole scene is drawn correctly, there are no problems with objects overlapping. The only difference I’ve noticed is that without this pass in the Unity editor, the grid always overlays on top of objects, even if they’re above it.
-
DepthNormals pass. If I understood correctly from the help, then this pass is needed to create the _CameraNormalsTexture texture, which is used to create post-processing effects (Fog, Depth of Field, etc.) ?
-
Meta pass. The help says that it is needed for the baked light map. But if you remove it, then the light baking still works and at about the same speed. So why is it needed?
-
Universal2D pass. I don’t understand why it is needed. Without it, 2D objects are rendered normally. So why is it needed?