fix: use consistent XR session check for viewport sizing and add stereo GSplat test example#8557
Merged
mvaligursky merged 1 commit intomainfrom Mar 30, 2026
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix viewport width calculation for stereo XR sessions and add a hidden test example for stereo Gaussian Splat rendering.
Changes:
viewport_sizeuniform incorrectly using full canvas width instead of per-eye width during XR sessions. The check usedcamera.xr?.activewhich only works with the real XR manager, but the forward renderer's view loop usescamera.xr?.session— changed to.sessionfor consistency.gaussian-splatting/xr-viewstest 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.