Skip to content

Fix WebGPU XR stereo viewport and harden vr-lod example#8761

Merged
mvaligursky merged 1 commit into
mainfrom
mv-vr-lod-xr-fixes
May 21, 2026
Merged

Fix WebGPU XR stereo viewport and harden vr-lod example#8761
mvaligursky merged 1 commit into
mainfrom
mv-vr-lod-xr-fixes

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

Fix WebGPU XR stereo rendering and polish the VR LOD example so it runs reliably on Apple Vision Pro.

Changes:

  • Renderer#setCameraUniforms and GSplatManager#sortGpuHybrid now read the per-eye viewport from camera.xr.views.list[0].viewport directly instead of inferring per-eye width by halving target.width. The XR bridge already reports the correct per-eye rectangle for both side-by-side single-texture layouts and multi-pass per-eye-view layouts, so the explicit halving (which produced quarter-eye widths under WebGPU multiview) is gone.
  • vr-lod example: drop the desktop mirror to half-DPR when devicePixelRatio >= 2. The previous 2× DPR triggered Vision Pro Safari to reboot after ~15 s of gsplat fragment load.
  • vr-lod example: replace the controls-panel Enter VR button (which could not provide WebXR transient activation across the iframe boundary) with a fixed-position DOM button rendered inside the example document. The button hides while a session is active and reappears after the session ends. Remove the now-redundant XR panel from the controls.

- Renderer#setCameraUniforms and GSplatManager#sortGpuHybrid now read
  the per-eye viewport from camera.xr.views.list[0].viewport directly
  instead of halving target.width — works for both side-by-side
  single-texture and multi-pass per-eye-view layouts.
- vr-lod example: drop the desktop mirror to half-DPR when
  devicePixelRatio >= 2 to avoid Vision Pro Safari reboots under
  sustained gsplat fragment load.
- vr-lod example: add an in-iframe Enter VR button so WebXR's
  transient-activation requirement is satisfied; remove the broken
  controls-panel XR toggle.
@mvaligursky mvaligursky self-assigned this May 21, 2026
@mvaligursky mvaligursky added area: graphics Graphics related issue area: xr XR related issue labels May 21, 2026
@mvaligursky mvaligursky merged commit 3631d45 into main May 21, 2026
13 of 14 checks passed
@mvaligursky mvaligursky deleted the mv-vr-lod-xr-fixes branch May 21, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue area: xr XR related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant