feat: added immersive window support for VR race views

- Introduced a new configuration option for immersive window mode in runtime_config.h.
- Updated the parsing and setting functions to handle the immersive window state.
- Modified the OpenXR backend to support rendering with the immersive window, blending the race view with the surrounding environment.
- Enhanced the settings overlay to allow users to select between immersive, immersive window, and flat screen race views.
- Implemented GPU rendering logic for the immersive window mask, ensuring correct visual output in various rendering paths.
- Added tests to validate the immersive window functionality and its interaction with existing race view settings.
This commit is contained in:
iChris4 committed 2026-09-24 21:28:17 +02:00
1 parent 1969dda0bf
commit 1cf9389d69
20 files changed
+917 -53

No files matched your search

+9 -3
View File
@@ -132,9 +132,15 @@ struct OpenXRPresentation {
bool quad_anchored = false;
XrPosef quad_pose{{0.0f, 0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, 0.0f}};
// Show the room through the headset's cameras around the virtual screen
// (OpenXRPassthrough). Taken when the presentation is handed to the backend,
// which starts or pauses the view then; a backend without one ignores it.
// Used only by ImmersiveProjection: Aurora left each eye transparent outside
// the race's 2D-layer screen (AuroraStereoFrame::window), so the projection
// layer is blended by its alpha over whatever is under it.
bool immersive_window = false;
// Show the room through the headset's cameras around the virtual screen or
// the immersive window (OpenXRPassthrough). Taken when the presentation is
// handed to the backend, which starts or pauses the view then; a backend
// without one ignores it.
bool passthrough = false;
OpenXRPanelLayer panel;
+11 -3
View File
@@ -61,11 +61,19 @@ void OpenXRRequestRecenter() noexcept;
void OpenXRSetLeanBackDegrees(float degrees) noexcept;
// Shows the room through the headset's cameras around the menu screen and every
// other virtual screen, never during an immersive race. Only the standalone
// (Quest) backend offers it; elsewhere this changes nothing. Callable from any
// thread; applied on the XR pacing thread's next frame.
// other virtual screen, and around the immersive window, never during a fully
// immersive race. Only the standalone (Quest) backend offers it; elsewhere this
// changes nothing. Callable from any thread; applied on the XR pacing thread's
// next frame.
void OpenXRSetPassthrough(bool enabled) noexcept;
// The immersive window: an immersive race keeps its stereo view but is seen
// only through the screen its 2D layer sits on, with the room (or, without
// passthrough, black) around it. Callable from any thread; applied to the next
// published frame. Flat Screen mode, which keeps races off the immersive path
// altogether, makes it moot.
void OpenXRSetImmersiveWindow(bool enabled) noexcept;
// Live scene interpolation at the headset's own display deadlines.
// 0 = Off, 1 = Auto, otherwise 72/90/120 as a rendering-rate ceiling.
void OpenXRSetFrameInterpolationFps(uint32_t target) noexcept;