URP 12.1 Heavy performance hit with Depth Texture enabled

Hey guys,

we’ve recently updated to 2021.2 and URP 12.1 (from 2020.1 and URP 8.2) and we’ve noticed a heavy drop in performance in all of our scenes (around -50%). Even in our lightweight main menu scene.
When turning off depth texture the frame rate jumps back to what it was before the update (Depth Texture was enabled in the old version with urp 8.2).
When activating the decal render feature we see the same issue even with Depth texture disabled. (I assume unity is forcing a depth prepass in the background here)

Build is running on

  • Oculus quest (1)
  • Unity 2021.2
  • URP 12.1
  • Oculus XR Plugin 1.11.2
  • Vulcan

Am i missing something obvious here?

Hey.
What depth priming mode do you have set in the renderer asset?
What Technique is the decal render feature set to use?

Rendering Path is forward, Priming Mode is Disabled.
Technique is Automatic.

Try setting the decal technique to Screen Space and see if that helps. I would hope that that’s what the automatic setting does but it is worth a try. If you’re still seeing slow performance, try hooking up the frame debugger and check if the depth prepass is being injected by something else.

Is it a bug that it would be 50% slower on vulkan for this? Wondering if something needs to be filed or not.

Screen Space results in the same slow performance. I did try setting it explicitly and i see no difference between automatic and screen space.

I’ll check out the frame debugger now.

Okay, so im not really sure what to look for here:

DepthDecal is Depth Texture and Decal Feature enabled.
NoDepth2 is both off.
DepthDiff is the Copy Depth in detail
FinalBlit is the detail for the Final Blit
Only difference i can see is Copy Depth and the Final Blit being present with depth on.
I also did a test with Depth Texture disabled and only the Decal Feature and it looks as the one with both enabled. (as expected)




I don’t have a good answer why this is slowing down so much for you. To confirm:
Disabling the “Depth Texture” check box on the pipeline asset gives you back the framerate?

Yes, exactly. Disabling Depth Texture (and disabling the decal feature) gives back the exact performance and framerate we had before the update.

Edit: i could provide a profiler snapshot, if required

And what about decals off, depth on. Does that also give you the performance hit? Or is it only when using decals
Sorry for the many clarifying question. I want to be sure I get what’s going on

No problem.

Yes, Depth alone is the exact same performance hit, as with both on, or only decals.

Also, in the main menu scene are no decals used. So the performance hit occurs without decals being present.

@
not certain if related to your topic but the Decal enable check box is inverted
see issue tracker
Unity Issue Tracker - Decals disappear when using DE Environment package and “Decal Layers” is enabled (unity3d.com)

so basically, Unity off is on and on is off :slight_smile:

Sounds like tile resolves to me.

Hi! Did you find a solution? I have the same problem

the “Depth Texture” option in 21.2 causes an extra depth copy pass, it used to be a depth prepass instead of a depth copy in previous versions. So looks like your specific performance issue is because of the DepthCopy.

We added an extra option in the latest update to force the old behaviour (prepass instead of copy) so you should go back to the original perf cost.

We added a new “Depth Texture Mode” option in the Universal Renderer Data, select “Force Prepass” so you are guaranteed that URP won’t do the depth copy anymore

Note: there are still scenarios where DepthCopy performs better than DepthPrepass, it all depends on the geometry complexity of your scene. So we now give both options to make sure that you can optimize it based on your scenes

1 Like

Hello guys, I know it’s been a long time bug I have exactly the same setup and I have exactly the same issue.
I have tried all the combinations of “Rendering Path” - “Depth Priming Mode” “Depth Texture Mode”

I tried this, and it’s not working, worst my headset crashed completly with “Force Prepass” enabled.

Another clue, when I disable the MSAA completly I have no rendering issue, but obviously I have a lot of aliasing. It made me think of a bug reported in this post :

Unity : 6000.0.27f1
Meta Quest 3
Meta XR 76.0.1
URP 17.0.3
Vulcan

First Update to the latest unity 6. Feel free to try my default XR settings for quest 3 as well: GitHub - smitdylan2001/Unity-6-URP-XR-Base: Base project for Unity 6 for XR apps and games using Universal Render Pipeline
If you tested the settings again and it happens, file a report in editor via help - report a bug

Thanks for your message, my setup was almost the same as yours. I just tested a little bit more and install the latest version of Unity 6.1. There is indeed a bug when Decals render feature is enabled + MSAA.

I’ll report a bug, Thanks

Appreciate, can you share the report ID here?

I have created the Bug report : CASE IN-105939

1 Like