Black Screen in AR Video on Magic Leap 2


I am building an app using Cesium for Unity for a Magic Leap 2. Something I have noticed is that when Cesium is enabled, I am unable to use various video features of the Magic Leap 2. Under normal circumstances, I can use either a device stream, or record video directly on the headset. The results of those would be a video showing my device camera with the virtual content overlaid. Here’s an example of what that would look like:

You can see what I’m looking at, with the virtual beam overlaid. That picture was taken right before Cesium was enabled in my scene. After Cesium is enabled, and even after it is destroyed, taking that same image looks like this:

Now I can only see the virtual content with a black background, but a strange stripe of camera is visible on the left side.

I believe I narrowed it down to the world terrain object. Specifically, I am using Cesium World Terrain + Bing Maps Aerial Imagery.

Is there some kind of rendering setting that Cesium sets when it is enabled that might be causing this? Any insight would be helpful. Thanks!

I figured out what was going on. For anyone else who may run into this:

The Cesium aspect of it was fixed by going into Project Settings > XR Plugin Management > Magic Leap and turn on Force Multipass. Then I discovered I had the same issue with one of my shaders. To fix that, I disabled Depth Write on the shader.

1 Like