UI Misalignment in World Space Canvas on Magic Leap 2

Hi everyone,

I’m developing an AR application on Magic Leap 2 using Unity (2022.3.22f1) with Magic Leap SDK 1.12.0. In my project, I display dynamic UI elements (like face bounding boxes) on a World Space Canvas placed in front of the user. Everything works functionally, but I’m running into a persistent stereo misalignment issue:

The UI elements (e.g., image boxes with labels) appear in different positions for the left and right eyes, creating a “ghosting” or double-vision effect. For each detected face, one eye sees the box in the correct place, while the other sees it slightly offset.

Notably, when closing one eye:

  • With the left eye open, the bounding box appears slightly to the left of the face.
  • With the right eye open, the bounding box appears slightly to the right of the face.

This suggests a stereo parallax issue — the UI elements are being rendered in slightly different positions for each eye, failing to converge at the correct world space location.

Some additional context:

  • The Canvas is set to World Space mode, with a fixed size (640x480) and positioned 1.5 meters in front of the Main Camera.
  • The World Space Canvas itself is repositioned in LateUpdate() to remain a fixed distance in front of the user’s head.
  • The bounding boxes are generated and updated once per image frame, based on the resolution of the RGB image used for detection.
  • I’m using a Main Camera from ML Rig, which is configured for stereo rendering by default.
  • The Canvas and all UI elements are placed in the same layer (UI), and the Canvas is assigned the correct Event Camera.
  • The boxes are basic Image + TextMeshPro prefabs instantiated under the canvas.

I’ve also tried enabling Additional Shader Channels: TexCoord1 and TexCoord2, but the issue remains.


What I’m looking for:

  • Is there a recommended way to ensure identical positioning of UI elements across both eyes in stereo mode?
  • Would rendering the UI for one eye only (monoscopic) be a viable workaround in this case?

Any insight would be greatly appreciated!

Thanks,