The approach gives greater coverage than standard Firestorm VR Mod for VR HMDs which need vertical as well as horizontal image adjustment (including Meta Quest 3).
https://discord.com/channels/613119193734316042/613119193734316044/1260076127003869205
File: Phoenix-FirestormOS-SgeoMinVR-7-1-9-74748_Setup.exe (166.45 MB)
Caveats
- No sound at present (a later GHA automated build will hopefully fix this).
- This release needs openvr_api.dll added to the install directory (the GHA automated build will hopefully fix this). A copy can be taken from the usual Firestorm VR Mod release.
- The FOV defaults to small. You can use the usual Firestorm keyboard shortcuts for FOV/Zoom: Out Ctrl+8, In Ctrl+0, Default Ctrl+9.
- As in the usual Firestorm VR Mod the mouse can be moved to an edge or corner to shift the view to better access menus and buttons. The 3D view is distorted when the mouse isn’t in the middle.
Approach
Peter Kapplers VR Mod (P373R) code llviewerVR.cpp contains a line:
glBlitFramebuffer(bx, by, tx, ty, m_iTextureShift, 0, m_nRenderWidth + m_iTextureShift, m_nRenderHeight, GL_COLOR_BUFFER_BIT, GL_LINEAR);
Sgeo replaced that with
glBlitFramebuffer(bx, by, tx, ty, m_nRenderWidth * uMin, m_nRenderHeight * vMin, m_nRenderWidth * uMax, m_nRenderHeight * vMax, GL_COLOR_BUFFER_BIT, GL_LINEAR);
So instead of a horizontal texture shift, it’s adjusted and scaled by uMin/uMax and vMin/vMax, which are automatically calculated based on SL’s FOV and the VR projection matrix.
At least one (small) change is made to llviewerdisplay.cpp: gVR.m_fEyeDistance to gVR.eyeDistance()
Source Code and Changed Files
https://github.com/Sgeo/p373r-sgeo-minimal/
https://github.com/Sgeo/p373r-sgeo-minimal/blob/sgeo_min_vr_7.1.9/indra/newview/llviewerVR.cpp
https://github.com/Sgeo/p373r-sgeo-minimal/blob/sgeo_min_vr_7.1.9/indra/newview/llviewerVR.h
https://github.com/Sgeo/p373r-sgeo-minimal/blob/sgeo_min_vr_7.1.9/indra/newview/llviewerdisplay.cpp
llviewerVR.cpp and llviewerVR.h should be fully replaced as expected, although Sgeo suggests that it would probably be a good idea to fix up the weird way it’s pointing to OpenVR, llviewerdisplay.cpp has one very small change from the P373R version.
Testing
Sgeo only tested on Quest 3 via Steam Link. It should work fine on other headsets and in other ways to use PC VR via Quest.