Performance and Vision Pro

So I am porting quest experiences to Vision Pro and the first impression is that the performance is bad, things don’t feel smooth, when I pan my view around I feel jumpiness. I did debug in device the 1/deltaTime and I am getting 90 to >100 fps but things feel oddly not smooth. Is there a better way to debug and understand what’s wrong with performance? Has anyone noticed a similar thing?

1 Like

Hi @Alex_Heizenrader

Can you reproduce this with all projects (for example, our sample) or just your own? If the latter, do any simplifications seem to improve performance - for example, hiding most renderers or disabling most scripts? You can also feel free to submit a bug (Unity Editor Main Menu > Help > Report a Bug) and upload your project, but the more information you can provide the greater the chances this bug will prove actionable for our team to address.

Hope that helps!
–Tim

1 Like

I tested disabling all scripts and the problem persists. I am getting a ton of the following messages in Xcode while running

Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations.
Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 6)
Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations.
Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 5)
Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations.
Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 8)

Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations.
Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 6)
Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations.
Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 8)

Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations.

Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations.
Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations.
Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations.
Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 7)
Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations.

Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations.
Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 6)
Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 5)

I am going to try to build some of the sample scenes and see performance. I am still not sure what the best way to debug is (looking outside the headset through the nosepiece? in Xcode?)

I just build one of the VR samples (InputSystem UI, with the ui and particles with a speed slider) and I obtain the same exact behavior. There is this jumpiness when looking around, and I am getting the same messages as above.

P.S: Unity 2022.3.19f1, Built-in-Renderer, VisionOS 1.0.3 package

1 Like

Is the Depth Texture on your camera set to “On”?

I am on Built In Render Pipeline, so I don’t have those settings under camera. I was also mentioning that this happens as well on Unity Sample scenes on device

1 Like

Ah, okay. Not sure about built-in RP. Perhaps there’s a similar setting to Depth Texture somewhere. In my case using URP, I just remember having this issue of the environment stuttering and shifting whenever I would move my head. After many hours of trial and error, I found that setting Depth Texture to On was all I had to do to fix it.

A Unity specialist will probably be more help to you. Good luck. Hopefully you manage to solve this.

1 Like

Sounds very much like what I experience, hopefully someone from the Unity team can chime in with ideas for built-in @timc-unity

Thanks for sharing your experience as well, sounds spot on to what I experience on device.

1 Like

Here is a small clip showing this behaviour https://imgur.com/a/RKA7EFc

From internal discussions, it does sound like this is likely to be due to a lack of depth texture for the Camera. Although it’s apparently not exposed in the Inspector, one thing to try would be to set the depthTextureMode of the Camera in script to DepthTextureMode.Depth:

using UnityEngine;

public class EnableDepthTexture : MonoBehaviour
{
    void Start()
    {
        GetComponent<Camera>().depthTextureMode = DepthTextureMode.Depth;
    }
}

I tried that and saw no improvement unfortunately

Hey @Alex_Heizenrader, I tried to reproduce the issue with the VR samples and also a fresh project using BiRP but was unable to get the jumpiness you described . Can you attach another project where this behavior is happening to you? Thanks

I encountered the same problem when using the built-in RP. Have you resolved this issue?

No, I got a confirmation from the QA team that the issue was identified though:

" Your bug report Vision Pro performance in Built in renderer, BLOCKER has been confirmed and transferred to the appropriate internal development team at Unity. Your bug report has the following internal ID: XRVOSB-19"

I had a similar issue but it didn’t look quite like your video. Despite fps > 90, I was getting jumpiness and if I got close to virtual objects they would shake violently. I was initially porting an existing project. I imported the sample scenes within that same project to test and it was even happening in those. I ended up creating a fresh project with the exact same version of everything but no longer had the issue. I ended up narrowing it down to the Screen Space Ambient Occlusion (SSAO) settings on the Universal Renderer Data object. If I check Downsample, I have no issues. If it is unchecked, I get the shakiness. Interestingly, no other SSAO settings had an effect, only checking the Downsample box. It was having a dramatic effect, even in very basic scenes with tons of performance overhead. Turning off SSAO completely worked as well.

I just upgraded URP today and solved this problem.

Right, not a possibility for us to switch to URP

I got the same problem but check DownSample does not work for me. Sad.

Hi there! I have an update on this, and some tentative good news to share!

We did end up identifying an issue (thanks to this thread, and a few other reports) with reprojection using the built-in render pipeline and MSAA. This wasn’t something we initially noticed during our testing of MSAA support, because it can be confused with performance issues related to development/debug players, etc. Long story short, we have a fix in the works which should be available with the upcoming Unity 2022.3.27f1 release. Unfortunately we didn’t make it in before the cutoff for 2022.3.26f1, so you’ll need to wait a little longer. There is no way to work around the issue on your end.

There were also some frame pacing issues discovered in this process, which should be fixed in the next round of package updates to com.unity.xr.visionos (whatever ends up coming after 1.1.6). That fix will apply to all VR builds, regardless of render pipeline and MSAA settings. I don’t have a specific ETA for either of these releases, but I can at least confirm that I’ve seen what you are talking about and a fix is on the way. Once everything runs through our release/QA process, you should see bugs getting closed out, etc. but I wanted to let this group know as soon as I had something solid.

Thanks everyone for chiming in with your input and for your patience as we work out these issues! Of course, if you’re still seeing the issue after updating to these future releases, please let us know.

4 Likes

I didn’t see any mention to these in the 2022.3.27f1 release or subsequent ones. Any updates?

Also is there a solution to the “low res” aspect to things with the built in renderer, everything seems just low res, will this fix help? @mtschoen