From 78b117273c172a5c9814d6f2ce3d8a4a924bf005 Mon Sep 17 00:00:00 2001 From: OneUp Date: Thu, 27 Jun 2024 00:51:59 -0500 Subject: [PATCH] Remove non-functional settings; Update README with useful setup info --- README.md | 29 +++++++++++-------- vrto3d/src/hmd_device_driver.cpp | 10 ++----- vrto3d/src/hmd_device_driver.h | 2 -- .../resources/settings/default.vrsettings | 4 --- 4 files changed, 19 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index fadc46b..e92e9b9 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,6 @@ Windows-only solution, but there are other solutions on Linux like MonadoVR. | Field Name | Type | Description | Default Value | |---------------------|---------|---------------------------------------------------------------------------------------------|----------------| -| `window_x` | `int` | The X position of the window - can be used to move view to another display | `0` | -| `window_y` | `int` | The Y position of the window - can be used to move view to another display | `0` | | `window_width` | `int` | The width of the application window. | `1920` | | `window_height` | `int` | The height of the application window. | `1080` | | `aspect_ratio` | `float` | The aspect ratio used to calculate vertical FoV | `1.77778` | @@ -22,10 +20,8 @@ Windows-only solution, but there are other solutions on Linux like MonadoVR. | `tab_enable` | `bool` | Enable or disable top-and-bottom (TaB) 3D output (Side by Side is default) | `false` | | `half_enable` | `bool` | Enable or disable half SbS/TaB 3D output. | `true` | | `reverse_enable` | `bool` | Enable or disable reversed 3D output. | `false` | -| `ss_enable` | `bool` | Enable or disable supersampling. | `false` | | `hdr_enable` | `bool` | Enable or disable HDR. | `false` | | `depth_gauge` | `bool` | Enable or disable SteamVR IPD depth gauge display. | `false` | -| `ss_scale` | `float` | The supersample scale. | `1.0` | | `display_latency` | `float` | The display latency in seconds. | `0.011` | | `display_frequency` | `float` | The display refresh rate, in Hz. | `60.0` | | `ctrl_enable` | `bool` | Enables or disables Controller right stick y-axis mapped to HMD Pitch | `false` | @@ -41,13 +37,14 @@ Windows-only solution, but there are other solutions on Linux like MonadoVR. ## Installation +- Get a multi-display configuration setup (see notes) - Install SteamVR - Download the latest release and copy the `vrto3d` folder to your `Steam\steamapps\common\SteamVR\drivers` folder - Edit the `Steam\steamapps\common\SteamVR\drivers\vrto3d\resources\settings\default.vrsettings` as needed -- Run SteamVR +- Run SteamVR at least once to verify that you see a Headset window. This is usually not needed before running games. - Try launching a VR game -- Drag everything besides the heaadset view to your second monitor -- Make the game's window in focus on your second monitor for control input to work +- Drag everything besides the headset view to your second display +- Make the game's window in focus on your second display for control input to work - Adjust Depth with `Ctrl+F3` and `Ctrl+F4` - Adjust Convergence with `Ctrl+F5` and `Ctrl+F6` - Save all Depth & Convergence settings with `Ctrl+F7` @@ -55,21 +52,29 @@ Windows-only solution, but there are other solutions on Linux like MonadoVR. ## Notes -- You will need a multi-monitor setup in extended mode. A virtual monitor will work, but will prove tricky. [This IDD one works](https://www.reddit.com/r/cloudygamer/comments/185agmk/guide_how_to_setup_hdr_with_moonlightsunshine/) -- Sunshine/Moonlight is compatible +- You will need a multi-display setup in extended mode +- The primary display will be where the "Headset" window is located +- The secondary display will need to have the game's main window in focus for control input from your mouse/keyboard/controller to work +- Here are some example configurations that are confirmed to work: + - A single display connected to your computer twice in extended mode - switch between the inputs on the monitor as needed to move windows around + - Multiple displays connected in extended mode - easier to move things around and manage + - A virtual monitor will work, but will prove tricky. [This IDD one works](https://www.reddit.com/r/cloudygamer/comments/185agmk/guide_how_to_setup_hdr_with_moonlightsunshine/) + - Sunshine/Moonlight is compatible +- Use Windows shortcut keys to move windowed programs around `Win + Left/Right Keys` +- Use Windows shortcut keys to move fullscreen programs around `Shift + Win + Left/Right` - SteamVR may still complain about Direct Display mode, but this can be safely ignored - Overlays generally won't work on this virtual HMD -- For most games, you will need to have the "spectator view" screen in focus for your inputs to register from mouse/keyboard/controller - Recommend using a XInput controller - This project is primarily targeted for VR mods of flatscreen games, not full VR games. As such, there is only headset pitch emulation and no VR controller emulation - OpenXR games/mods seem to be more likely to work and be stable than OpenVR ones - Select the OpenXR toggle in UEVR GUI - Delete openvr_api.dll for REFramework - Optional HMD pitch emulation can be turned on to help with games or mods that prevent you from adjusting the game camera's pitch with a controller/mouse (maps to XInput right stick Y-axis) + - REFramework lua files can be modified to remove the pitch lock. Search for `Stop the player from rotating the camera vertically` and remove the block of code from the `if` to its `end` - HDR doesn't seem to work currently -- Several mods/games may override your supersample and other settings +- Several mods/games may override your settings - DLSS, TAA, and other temporal based settings often create a halo around objects. UEVR has a halo fix that lets you use TAA, but others may not -- Depth and Convergence are saved to your `Steam\config\steamvr.vrsettings` when SteamVR is closed. There are only global settings, no per-game ones. +- Depth and Convergence are saved to your `Steam\config\steamvr.vrsettings` when you press `Ctrl+F7`. There are only global settings, no per-game ones. - User Depth and Convergence Binds - The `num_user_settings` field must match the number of user defined configurations - as many as you want - Each configuration's Field Names should end with an integer, starting from 1 diff --git a/vrto3d/src/hmd_device_driver.cpp b/vrto3d/src/hmd_device_driver.cpp index ea6a413..fabcd19 100644 --- a/vrto3d/src/hmd_device_driver.cpp +++ b/vrto3d/src/hmd_device_driver.cpp @@ -52,8 +52,8 @@ MockControllerDeviceDriver::MockControllerDeviceDriver() // Display settings StereoDisplayDriverConfiguration display_configuration{}; - display_configuration.window_x = vrs->GetInt32( stereo_display_settings_section, "window_x" ); - display_configuration.window_y = vrs->GetInt32( stereo_display_settings_section, "window_y" ); + display_configuration.window_x = 0; + display_configuration.window_y = 0; display_configuration.window_width = vrs->GetInt32( stereo_display_settings_section, "window_width" ); display_configuration.window_height = vrs->GetInt32( stereo_display_settings_section, "window_height" ); @@ -66,11 +66,9 @@ MockControllerDeviceDriver::MockControllerDeviceDriver() display_configuration.tab_enable = vrs->GetBool(stereo_display_settings_section, "tab_enable"); display_configuration.half_enable = vrs->GetBool(stereo_display_settings_section, "half_enable"); display_configuration.reverse_enable = vrs->GetBool(stereo_display_settings_section, "reverse_enable"); - display_configuration.ss_enable = vrs->GetBool(stereo_display_settings_section, "ss_enable"); display_configuration.hdr_enable = vrs->GetBool(stereo_display_settings_section, "hdr_enable"); display_configuration.depth_gauge = vrs->GetBool(stereo_display_settings_section, "depth_gauge"); - display_configuration.ss_scale = vrs->GetFloat(stereo_display_settings_section, "ss_scale"); display_configuration.display_latency = vrs->GetFloat(stereo_display_settings_section, "display_latency"); display_configuration.display_frequency = vrs->GetFloat(stereo_display_settings_section, "display_frequency"); @@ -168,7 +166,6 @@ vr::EVRInitError MockControllerDeviceDriver::Activate( uint32_t unObjectId ) vrp->SetBoolProperty( container, vr::Prop_DisplayDebugMode_Bool, true); vrp->SetBoolProperty( container, vr::Prop_HasDriverDirectModeComponent_Bool, false); vrp->SetBoolProperty( container, vr::Prop_Hmd_SupportsHDR10_Bool, stereo_display_component_->GetConfig().hdr_enable); - vrp->SetBoolProperty( container, vr::Prop_Hmd_AllowSupersampleFiltering_Bool, stereo_display_component_->GetConfig().ss_enable); if (stereo_display_component_->GetConfig().depth_gauge) { vrp->SetFloatProperty(container, vr::Prop_DashboardScale_Float, 1.0f); @@ -259,9 +256,6 @@ vr::EVRInitError MockControllerDeviceDriver::Activate( uint32_t unObjectId ) // We need to get handles to them to update the inputs. vr::VRDriverInput()->CreateBooleanComponent( container, "/input/system/touch", &my_input_handles_[ MyComponent_system_touch ] ); vr::VRDriverInput()->CreateBooleanComponent( container, "/input/system/click", &my_input_handles_[ MyComponent_system_click ] ); - - // Set supersample scale - vrs->SetFloat(vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_SupersampleScale_Float, stereo_display_component_->GetConfig().ss_scale); // Miscellaneous settings vrs->SetBool(vr::k_pch_DirectMode_Section, vr::k_pch_DirectMode_Enable_Bool, false); diff --git a/vrto3d/src/hmd_device_driver.h b/vrto3d/src/hmd_device_driver.h index d7ab63d..0f3c8a4 100644 --- a/vrto3d/src/hmd_device_driver.h +++ b/vrto3d/src/hmd_device_driver.h @@ -51,11 +51,9 @@ struct StereoDisplayDriverConfiguration bool tab_enable; bool half_enable; bool reverse_enable; - bool ss_enable; bool hdr_enable; bool depth_gauge; - float ss_scale; float display_latency; float display_frequency; diff --git a/vrto3d/vrto3d/resources/settings/default.vrsettings b/vrto3d/vrto3d/resources/settings/default.vrsettings index d00d62e..fcfa865 100644 --- a/vrto3d/vrto3d/resources/settings/default.vrsettings +++ b/vrto3d/vrto3d/resources/settings/default.vrsettings @@ -5,8 +5,6 @@ "model_number": "Stereo3D-1" }, "vrto3d_display": { - "window_x": 0, - "window_y": 0, "window_width": 1920, "window_height": 1080, "aspect_ratio": 1.77778, @@ -16,10 +14,8 @@ "tab_enable": false, "half_enable": true, "reverse_enable": false, - "ss_enable": false, "hdr_enable": false, "depth_gauge": false, - "ss_scale": 1.0, "display_latency": 0.011, "display_frequency": 60.0, "ctrl_enable": false,