#URP vs Built-in for Quest
1 messages · Page 1 of 1 (latest)
You'd be shooting yourself in the foot by picking built-in for a new Quest project. You can expect more Quest features than just AppSW to be URP exclusive in the future.
My understanding is that URP has had very inconsistent performance on Quest for a while, but it has stabilized recently.
Assuming you're on a recent Unity and URP version.
So what are we talking, 2021, 2022, 2023?
I've been reading bug reports about this for at least 2020 and 2021. 2021 LTS may have received fixes for it alongside 2022 and 2023.
So I should use URP with AppSW on 2022 or 2023?
Don't use AppSW unless you have to.
Why?
Another question, is the lightning system or post processing system any different in URP in terms of performance. Will they work like I described here: "Ideally, I want to run at least one realtime spotlight with no shadows, use scopes (so just a second camera, I don't know if the SRP batcher can deal with this any better), and have night vision (so some kind of simple color/exposure post-processing) all at once."?
Edit:
I could make night vision and scopes not work together if it's too demanding, but either nvgs or scopes have to run at the same time as at least one spotlight.
Post processing is basically identical performance wise and not recommended for Quest. The GPU architecture on Quest makes post processing much more expensive compared to desktop GPUs. If performance matters to you, and it should, you'll find other workarounds, such as applying the effect globally as part of shader on all objects in the scene.
The real-time lighting system is significantly different in URP, for the better. In built-in, any real-time light hitting a mesh will cause that mesh to be redrawn with a transparent overlay on top of the base pass to add the light on top. This means if you have a large building mesh and a light hits a small part of it, the whole building gets rendered twice.
URP has two options for real-time lights, Forward and Forward+. Forward works by finding the N number of lights that hit an object and passing that light information into the object's shader to apply the lighting. This way it can do lighting in one pass. You have to set a maximum number of lights that can affect per object.
Forward+ takes all the lights and puts them in an optimized 3D grid within the camera's frustum and makes this accessible to shaders for them to find all the lights near them. This means you avoid the per object light limit and can support things like per-particle lighting with VFX Graph.
Let me rephrase: don't use it at the start of your project.
It will hide performance issues that may be trivial to fix, if you spent the time to figure it out.
There are other reasons to not want to use it, such as artifacts on transparent elements like particle effects.
So my approach would be to use Unity 2022 with Oculus' URP fork that supports AppSW, but I'll keep it disabled at the start of my project.
Should I use Forward or Forward+? Having at least one, preferably four simple shadowless realtime spotlights on Quest is pretty crucial for my project.
It's easy to change so I would try both. Forward+'s main benefit is for handling many lights, so you may not see much improvement or even worse performance if you're only using 1 or 4 lights.
The size of the light ranges also matters. One light with a huge range can be much more expensive than 16 lights spread apart with small ranges.
But is 4 lights even possible? I tried adding one once, and performance tanked, my GPU usage went up by like 40%
Which shader were you using for your environment? How big was the light range. How big were the meshes that the light was overlapping?
Neither RP will give you good performance by default. You will always have to optimize your scenes by choosing shaders, mesh complexity, light setup, etc.
About that, my plan is to use a non-PBR workflow for everything except firearms and potentially the player’s IK.
Is the Simple Lit shader good enough for that, or should I use a more optimized shader that only supports a base map?
Also, the Simple Lit shader only supports specular highlights with realtime lights, which I don't want to use for the main light, only for flashlights. I tried using specular probes (https://github.com/zulubo/SpecularProbes), but Simple Lit doesn’t support environment reflections. So for metallic objects that aren’t firearms, should I use the default Lit shader, matcaps, or something else?
I haven't used SimpleLit. It looks simple enough, but you'll get better performance with a custom shader that only does what you need it to do.
In fact, I might as well use matcaps for firearms too and try to implement some sort of occlusion probe that changes the matcap brightness based on if the player is interior or exterior.
So are matcaps a valid solution to my specular highlights problem? Sorry if this sounds really dumb but I have little experience with graphics programming.
And also, Unity 2022 LTS with URP it is then?
I can't say for sure if 2022 LTS + URP performance is solid, I haven't tried it. But if it isn't, I'd be very surprised.
What version can you say has good performance for sure then, just so that I have a reference point?
I don't, is the thing. I'm just assuming that Unity and Meta have identified and fixed the issues that were plaguing them in the past. They are both going all in on it, so they better have. But if not, at least you'll be in good company because most new Quest games use URP.
Matcap doesn't allow for any dynamic lighting, so you wouldn't get specular highlights from your flashlight. I haven't used matcap materials Quest, nor have I ever seen it as a recommended optimization technique. It seems more common for quick prototyping of different lighting conditions in 3D modeling software.
Alright then, I'll do some tests and figure out what works best, thanks so much for helping me out.
Do you mean a written hlsl shader or a shader graph shader?