I see a lot of people complaining about VR performance in the URP, especially on android (which is almost all standalone VR hardware).
Are there plans to fix this? It mostly comes from the lit shader according to CloudWalker.
This is limiting a lot of devs to 2020, so they will miss the 2021 and 2022 features
There is 1 issue fixed, 1 issue marked as duplicate falsly and 1 recent bug report which got through.
Thought it was just me! That performance regression when updating to 2021 is not fixed, no matter what those closed bug reports on the issue tracker suggest.
This doesn’t address the main issue (performance regression in newer versions), but I would say it’s a little surprising that people are using URP/Lit instead of URP/SimpleLit or something custom on Quest 2. The XR2 on Quest 2 is not low-end mobile hardware by any means, but it has to render a lot more pixels than most phones.
It would be good to hear which shader Unity expects devs to use in mobile VR. Maybe they’re not using URP/Lit in their own tests.
Performance regressions really should not happen without a very good reason. Truth of the matter is that our automated performance testing is not perfect. Yet We will do what we can to rectify any unwarranted performance regressions.
We are having ongoing discussions about our shader tiers and whether we should add more mobile friendly shaders. Stay tuned for updates on that.
Personally I would not use the URP lit shader on something like the Quest and would instead do an unlit shadergraph (and do custom lighting in a custom function node). Doing custom lighting in shadergraph is not a flawless workflow but it can be done, and is performant if done right. Block Shaders are in active development and will make custom lighting models much nicer to do so stay tuned for that as well
some of the issues you mentioned are marked as fixed because the fix has landed in our branch, it doesn’t necessarily mean that the changes made it to a package release yet. So should be available with the new update
We are waiting for the XR team to come online so they comment on the specific issues, since I know few Quest2 performance fixes have landed recently for 21.3 but I am not familiar with the details
but surely the whole point of the URP was that it was going to be mobile friendly?..
With specific reference to Quest2, I totally get needing to steer clear of screen space effects because of the tiled rendering but lit shaders… really? Personally I’m finding @jbooth_1 's BetterLitShaders to work great. My point is that porting a project with no changes from 2020 to 2021 should not lose me 3ms. With a frame budget of only 13.7ms for 72Hz (I usually like to aim for more) that’s too much of a hit to swallow. I just went straight back to 2020.
Maybe this is a miscommunication issue as well. I would view using URP/Lit for mobile VR the same as using Standard in built-in; not recommended unless you have a particularly simple scene.
URP/Lit is certainly more performant than Standard, especially when it comes to real-time lights, but it’s still a PBR shader and you’re always going to pay a performance tax to do physically based rendering.
So, URP/SimpleLit should be used on Quest, or if you want to squeeze as much performance and quality as you can, a custom shader tailor-made for your game is always going to be better than a general purpose one.
Totally agree, SimpleLit is the way, but what was being suggested was Unlit. Not everyone has the knowhow to write their own (performant) shaders so we rely on the engine team, or third party sellers.
One of the biggest performance issues for mobile VR is texture bandwidth, and the standard lit shader is terrible here. You can pack a full PBR material down to as little as 2 textures, but the URP lit shader uses 5. I’m sure that was done to make it use the same layout as BiRP, so that switching would be easier, but it does hurt performance. (Also there are quality downsides to doing this from compression, but even so a better layout like the one HDRP uses would have been nice)
Hi,
I would like to comment on the issue with some more details.
This issue is submitted by XR automation tests and the test repro case was using SimpleLit shader. Upon investigation, the performance regression is due to additional light variant which increased shader instruction count. That being said, if you see performance issue with the Lit shader, then that could be a separate issue. Performance regressions should not happen without a good reason. We will look into the Lit shader perf case.
We understand our performance automation tests are not perfect and we have plans to improve the tests to cover more features and collect more metrics. This is a continuous effort and would help us we to catch and address performance regressions better.