UnityFurURP icon indicating copy to clipboard operation
UnityFurURP copied to clipboard

[Solved] "Depth" Pass doesn't work with SSAO (tested on URP 12.1)

Open jiaozi158 opened this issue 2 years ago • 3 comments

When I was trying to apply Depth of Field post-process effect, I found that some sorting problems appear.

Using URP 12.1 (Unity 2021.2.0f1): image

Then I opened the Shell sample scene to check if it is because of my wrong settings.

In the Frame Debugger, all the meshes using Shell Shader cannot be written into the Depth (Texture?).

Using URP 12.1 (Unity 2021.2.0f1): image image

I also tested the Depth in Unity 2020.3.23f1 and Depth of Field works as expected. ( Using the sample project on Github ) image image

I've searched the Unity Forum but found nothing helpful. Is this caused by something changed in the new URP? ( just like the main light shadow )

jiaozi158 avatar Dec 02 '21 17:12 jiaozi158

When I output the DepthOnly to a RenderTexture, it seems to have no problem. (Using another camera)

Using URP 12.1 (Unity 2021.2.0f1): image

jiaozi158 avatar Dec 03 '21 03:12 jiaozi158

When I turned off SSAO (URP Render Feature), everything suddenly works.

jiaozi158 avatar Dec 03 '21 13:12 jiaozi158

I found the solution:

In the SSAO, choose Source: Depth and check After Opaque: image

jiaozi158 avatar Dec 03 '21 14:12 jiaozi158