Graphical Glitches

Hi, periodically when I launch an app I'll get graphical glitching on the top (usually green with mixed colors, think Missing No. from Pokemon) as well as choppy framerate. I've noticed this in both my Unity app as well as the Magic Leap model viewer app. This happens maybe once in 10-20 app launches. Restarting the app does fix it, at least until it happens again.

I'll try to get a screengrab of it happening.

Any ideas what's going on?

Version 1.4.0-dev2
Build B3E.230907.10-R.033
Android API Level 29

Unity: 1.11.0

@rob42lou Do you see the glitching occur under heavy CPU/GPU loads? Do you see the same glitching when going through the Custom Fit application? (Specify when completing the step with the 4 corner animation.)

I ask because we are actively looking into a bug that has been reported to cause visual glitches at the top of the FOV but it may be unrelated to your issue. If the visual artifacts occur during high CPU/GPU loads it's most likely related to the device running out of resources and being unable to draw the frames at 60fps.

Magic Leap 2 upscales the application's framerate from 60Hz to 120Hz. This ensures that the content appears stable and creates a comfortable user experience. However, if your application renders at a lower rate, the upscaling will cause the new frame to be rendered before the old one is complete, which results in the glitching that you are describing. As a general rule, we recommend making sure that a single draw call does not take longer than 2ms to render.

I recommend using some of our profiling tools to determine what might be causing the frame drops in those scenarios:

If you application is GPU bound, you can enable the Force Multipass setting (Project Settings > XR Plug-in Managements > Magic Leap Settings). This will reduce GPU usage at the cost increased CPU usage. When Multipass is enabled, and you application's performance continues to fall below 60fps you may notice the frames updating less frequently, but glitching will be reduced or eliminated.