MSAA 4X. Nothing else and that’s a fact. This is something you have to work with on that hardware, and I suspect you’re measuring the cost of it incorrectly, or blaming it when really it’s a tiny cost that is the straw that breaks the camels back.
There also isn’t anything faster than it on Quest.
[quote]
but my frame rate went down by about a 1/3.
[/quote] What is that in millisecs?
If you are using Universal Render Pipeline, you could try to decrease the Render Scale value under the URP Settings > Quality > Render Scale. It will have an impact on performance but perhaps in your situation it will not be detrimental.
Thanks a lot, really appreciate the feedback, see pics below with profiler.
Pipeline = URP
Pic1 and 2 are with running game through Laptop with link cable viewed through headset.
Pic3 and 4 are (after many trials) getting unity to run the game through my headset without the editor (remote profiling).
Link Cable connected, game running on Quest 2, Game not running on Unity, game sync’d with Profiler.
So to clarify, when I just run the APK in my headset with no AA I get 70’ish FPS, when I enable MSAA 4X I get 35’ish FPS.
Thanks again for any feedback and recommendations…
That’s what I expected. I in this case, MSAA is only the straw that breaks the camel’s back. Let me explain: it doesn’t cost half your framerate.
When you have vsync and don’t meet the framerate target, it will wait for the next frame, effectively halving your framerate. This isn’t because of MSAA, it’s because you’ve broken your budget long before then.
The actual cost of MSAA is very little, but just enough to push you over the edge and let vsync halve your framerate. To fix this, optimise it elsewhere.
TLDR: it is probably your shaders/other choices that leave you right near the edge before AA. You just can’t develop like that on VR. You can also look into FFR and other techniques to buy back performance or use cheaper shaders / no HDR etc.
Put your profiler in hierarchy view and sort the columns by millisecs for another view.
Thanks hippocoder, it’s tough, I try hard to make all my scripts efficient and have went through so many optimization tutorials but designing in VR and as a hobby I just don’t have the knowledge or experience yet… but I’m trying and I’ll keep struggling… thanks for taking the time to help us newbs out…
I don’t necessarily think its the proverbially, straw that breaks the camels back though, because if I remove about 1/4 of my geometry (just disable it) the problem remains, I think I have a more deep rooted problem. Your comments sparked many thoughts and ideas, one being shader choices, when I buy an asset from the store and everything comes out pink, I don’t do a good job of finding an efficient shader or even know which are the more efficient shaders. I tend to grab the first one that works that gives me a decent image, I’m going to dig deeper into this.
Also, light baking, I thought if I did this, it would help, but if I turn off ALL of my lights the problem remains.
What makes this problem extra frustrating, is that I only see the issue when I export to apk and run my game in my head set, if I run via laptop and link cable the FPS’s are similar with and without MSAA 4X. Which I guess makes sense as I have a decent GPU on my laptop.
It’s not all that little actually, especially on tiled rendering hardware. Whereas on that hardware the MSAA resolve happens before reading out the data and thus GMEM bandwidth isn’t increased, the larger memory footprint of the buffer yields a higher number of tiles and since there is a per-tile overhead, you can definitely get much better performance without MSAA.
For me what worked best for high-performance mobile VR is to not use MSAA but instead rely on shader based tricks (not post processing, but directly during ofrward rendering) and texture filtering to do anti-aliasing.
did you analyze a frame using the special oculus build of RenderDoc (https://developer.oculus.com/blog/renderdoc-for-oculus/) and compare one trace with MSAA and one without? if not, you should do that, it will give you more insight into how to attack your bottleneck
I did not, I am working with Oculus OVR right now and do some side by side comparisons. Some early things I’m noticing is that real time lighting seems to have a big hit on MSAA 4XX but not so much on NO AA… one important feature in my game is that the player can walk around with a torch so I can bake most lights but not all…
so is that a common recommendation in VR, do no use real time lighting with MSAA 4X? I would think it would be on a case by case basis but I mean in general is that a rule of thumb? I get there may be exceptions… but I have not heard that before… thanks…
MSAA 4x is lowest painless AA for me. Rendering scale 1.
I tried a point light, spot light without and with shadows tuned to the lowest level, but I couldn’t keep 72 FPS absolutely stably. So now I have no lights at all, lightprobes and baked only. + decal shadows.
Maybe Quest 3 gets the lights back?
EDIT 16.4.2022: After returning to the Oculus Quest project, I can’t restart FFR (so I can see the pattern). In the meantime, I switched to the new version of Unity and Quest was also updated several times …
EDIT 26.1.2023: new project with 2021 and everything works fine