Skip to content

fix: use consistent XR session check for viewport sizing and add stereo GSplat test example#8557

Merged
mvaligursky merged 1 commit intomainfrom
mv-gsplat-xr-stereo-test
Mar 30, 2026
Merged

fix: use consistent XR session check for viewport sizing and add stereo GSplat test example#8557
mvaligursky merged 1 commit intomainfrom
mv-gsplat-xr-stereo-test

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

@mvaligursky mvaligursky commented Mar 30, 2026

Fix viewport width calculation for stereo XR sessions and add a hidden test example for stereo Gaussian Splat rendering.

Changes:

  • Fix viewport_size uniform incorrectly using full canvas width instead of per-eye width during XR sessions. The check used camera.xr?.active which only works with the real XR manager, but the forward renderer's view loop uses camera.xr?.session — changed to .session for consistency.
  • Add hidden gaussian-splatting/xr-views test example that simulates stereo XR rendering with two side-by-side viewports using a fake XR session, useful for testing GSplat stereo rendering without an HMD.
  • The example includes an "Exaggerated Stereo" toggle to switch between realistic interpupillary distance and a wide eye offset for visual debugging. Both modes converge on the orbit target point.

…eo GSplat test example

The renderer's viewport_size uniform used camera.xr?.active to halve
the width for stereo sessions, but the forward renderer's XR view loop
checks camera.xr?.session. This inconsistency caused incorrect viewport
sizing when using simulated/fake XR sessions. Changed to .session for
consistency.

Added a hidden gaussian-splatting/xr-views test example that simulates
stereo XR rendering with two side-by-side viewports using a fake XR
session. Includes an "Exaggerated Stereo" toggle to switch between
realistic interpupillary distance and a wide offset for visual debugging.
Both modes converge on the orbit target point.

Made-with: Cursor
@mvaligursky mvaligursky self-assigned this Mar 30, 2026
@mvaligursky mvaligursky added the area: graphics Graphics related issue label Mar 30, 2026
@mvaligursky mvaligursky merged commit 6e46442 into main Mar 30, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-gsplat-xr-stereo-test branch March 30, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant