Opaque shape components aren't drawn in URP when SSAO and depth priming are enabled

Avatar
  • updated

This seems to be because the SSAO feature enables the DepthNormalsOnly pass and the opaque shaders don't define this pass, so they get culled by the ZTest if depth priming is enabled. Presumably any feature that enables the depth-normals prepass would have the same effect. Adding a pass with "Tags { "LightMode" = "DepthNormalsOnly" }" should fix it.

Steps to repoduce:

1. Create a new URP project and import Shapes, set up for URP.

2. If necessary, add Unity's SSAO render feature to the render pipeline (it should be there by default) in Settings -> URP-HighFidelity-Renderer.

3. Set the Depth Priming Mode to Auto.

4. In the menu, click Shapes -> Create -> Disc (or any shape)

5. Set the shape's blend mode to Opaque.

The shape won't be visible.

Reporting a bug? please specify Unity version:
2023.2.1f
Reporting a bug? please specify Shapes version:
4.3.1
Reporting a bug? please specify Render Pipeline:
URP
Avatar
Christian M

Thank you for reporting this bug!

I was baffled why my opaque shapes were not rendering in not-immediate mode. Setting:

URP-High Fidelity-Renderer (Universal Renderer Data) > Rendering > Rendering Path > Depth Priming Mode


to 


"Disabled"


convinced my Shape (a Disc) that has 


"Blend Mode" set to "Opaque"


to reappear in the scene