I don’t know if it’s a bug, but I don’t know what to do with it.
After updating from 0b1 to either 0b2 or 0b3 or 0b4 I get this Error in the Console:
I guess it’s related to URP which we’re using, but I’m not sure.
Everything is OK in 2021.2.0b1.
The moment I add Camera to new Scene it starts spamming.
I also tried deleting Library folder.
P.S.: I tried creating new project in 0b4 to test if it shows up there too, but couldn’t:
I was using Hub v3 Beta. Downgrading to v2 solved template issue.
I reproduced the problem and reported the bug by using manifest.json from actual project and URP asset settings from it.
Looks like it’s related to Quality Anti Aliasing (MSAA) setting - the error appears when it’s enabled.
Just to let you know I’ve had this bug as well, I spoke to someone from support about it briefly. The exact same things happens to me b3 and b4 both suffer from it. URP. Turning off all AA fixes it.
Hi @LeonhardP . We just hit that same bug with 2021.2.0b6 and I was wondering if it has been confirmed as a bug by your team? Can we already track it in issuetracker.unity3d.com?
@LeonhardP We were able to get rid of the error by changing Depth Priming Mode to Forced. If I understand it correctly, it is not a problem if our shaders use depth data anyway - am I right? Does that option incur any performance overhead?
Hmmm, I’ll take a look at the bug in case Depth Priming caused something to regress even when it’s disabled.
Forcing Depth Priming shouldn’t cause much performance overhead. It should cost you 0.x % CPU time (and some extra GPU memory in case of MSAA) in exchange for gaining 7-16% GPU time. Your shaders will need a depth and depthnormals pass.
Still, if something regressed when Depth Priming is disabled that shouldn’t happen and needs a fix.
No luck trying to reproduce it using the attached project. Tried on 2021.2.0b6 and our dev branch both with SRP v12.
Even after playing with MSAA and Depth Priming settings I couldn’t trigger it.
I saw that QA so far wasn’t able to reproduce it yet either.
If you’re ok using Depth Priming performance wise be aware that it currently still has a limitation regarding 3D Text rendering. UI Text rendering seems to be fine. We’re still working on straightening this out. (seems to be mostly some tweaks to the default 3D Text shader needed)
@NicoLeyman Thank you for investigating this. So the problem probably lies with one of our shaders or materials. We will try to make a minimal repro and submit a bug.
In the meantime we did some benchmarking on 2021.2.0b6 vs 2021.1.11f1 and discovered that forced Depth Priming adds approx. 0.5 ms to frame rendering time in our project. Full results are here:
@NicoLeyman So we’re still trying to isolate a repro but in the meantime I noticed that on macOS I get one more warning every frame, in addition to the original error.
Perhaps that warning holds a clue as to what is causing the error? It specifically points at the Universal Render Pipeline/CopyDepth shader.
People have been sufficiently poked and the fix just got merged into the master branch of the Graphics repo.
So next package release the bug should be gone.