Alex CoulombePresents
← all repos

unreal-visionos-basics

4

The UE 5.8 VR Template that actually renders opaque in mixed immersion on Apple Vision Pro.

The story

Follow Epic's visionOS docs exactly and the VR Template still comes up entirely semi-transparent on a Vision Pro. The three console variables Epic tells you to uncomment are correct and not sufficient: the template ships r.MobileHDR=False, so the mobile base pass draws straight to the backbuffer and SceneTextures.Color is never written — while the stock alpha-invert pass reads exactly that unwritten texture. Unreal's convention is alpha 0 = opaque; visionOS wants 1. The inversion silently never happens, so every opaque pixel tells the compositor it is transparent, and the only warning is one line buried in the device log. Eight hypotheses died against fork-side engine code before the real answer turned out to be a defect in stock UE 5.8. This repo is the working template plus every measured finding — including the ones that did not help.

Highlights

  • r.Mobile.EarlyZPass=1 is the fix — without it, the r.AlphaInvertPass Epic documents does nothing at all
  • r.AllowOcclusionQueries=False fixes geometry that renders in only one eye (also true in 5.7)
  • Shadows that actually stick: the VisionPro device profile inherits iOS caps that clamp after scalability runs, so sg.ShadowQuality is a no-op and 1024 → 4096 CSM has to live in the project's own device profile
  • Verified on a physical Vision Pro (M2, visionOS 27) against launcher-installed UE 5.8.1 — no engine fork, no source build, no command-line flags
  • Touch r.Mobile.EarlyZPass or r.MobileHDR and you must delete Saved/Cooked/VisionOS first — an incremental cook reports success and quietly ships the old shaders
$ git clone https://github.com/ibrews/unreal-visionos-basics.git