Render Pipelines
Built-In
No additional setup is required.
URP
You need to add a Renderer Feature called CommandBufferFeature.
In the UniversalRendererData inspector, click Add Renderer Feature and add CommandBufferFeature.
The image below shows the 3D URP in Unity 6:

If you're using 2D URP, open the Renderer2DData inspector, click Add Renderer Feature, and add CommandBufferFeature.
The image below shows the 2D URP in Unity 2022.3:

HDRP
-
Add a
CustomPassVolumecomponent to any GameObject in your scene. -
In the CustomPassVolume settings, set the
Injection PointtoAfter Post Process. -
In the
Custom Passeslist, add aCommandBufferPassand configure it with the following settings:Target Color Buffer: CameraTarget Depth Buffer: CameraClear Flags: None
