Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jiaozi158 opened this issue Dec 2, 2021 · 3 comments
Open

Comments

@jiaozi158
Copy link
Contributor

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
Copy link
Contributor Author

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 jiaozi158 changed the title "DepthOnly" Pass doesn't work as expected in new URP (tested on URP 12.1) "Depth" Pass doesn't work with SSAO (tested on URP 12.1) Dec 3, 2021
@jiaozi158
Copy link
Contributor Author

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

@jiaozi158
Copy link
Contributor Author

I found the solution:

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

@jiaozi158 jiaozi158 changed the title "Depth" Pass doesn't work with SSAO (tested on URP 12.1) [Solved] "Depth" Pass doesn't work with SSAO (tested on URP 12.1) Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant