diff --git a/Readme.md b/Readme.md index f626740..1e13870 100644 --- a/Readme.md +++ b/Readme.md @@ -62,10 +62,11 @@ Executing startdesktopmode.bat from the application folder shows a window on the - **Application Supersampling**: Supersampling setting for OpenVR applications/games. Application supersampling [now behaves linearly](https://steamcommunity.com/games/250820/announcements/detail/1256913672017664045) where 2.0 means twice the number of pixel. - **Compositor Render Target Multiplier**: Supersampling setting for the OpenVR compositor (Requires restart). Compositor supersampling still behaves the old way where 2.0 means four-times the number of pixel. +- **Enable Advanced Supersample Filtering**: Einable/disable image filtering on supersampled renderings. - **Allow Asynchronous Reprojection**: Enable/disable asynchronous reprojection. - **Allow Interleaved Reprojection**: Enable/disable interleaved reprojection. - **Force Reprojection**: Enable/disable forced reprojection. -- **Restart SteamVR**: Restart SteamVR. +- **Restart SteamVR**: Restart SteamVR (May crash the Steam overlay when SteamVR Home is running when you restart. Therefore I advice that you close SteamVR Home before restarting). ## - Chaperone Page: diff --git a/bin/win64/res/qml/MyResources.qml b/bin/win64/res/qml/MyResources.qml index f1e8e1c..2bc50e9 100644 --- a/bin/win64/res/qml/MyResources.qml +++ b/bin/win64/res/qml/MyResources.qml @@ -5,19 +5,19 @@ import matzman666.advsettings 1.0 QtObject { function playActivationSound() { - if (!OverlayController.soundDisabled()) { + /*if (!OverlayController.soundDisabled()) { activationSound.play() - } + }*/ } function playFocusChangedSound() { - if (!OverlayController.soundDisabled()) { + /*if (!OverlayController.soundDisabled()) { focusChangedSound.play() - } + }*/ } - property SoundEffect activationSound: SoundEffect { + /*property SoundEffect activationSound: SoundEffect { source: vrRuntimePath + "content/panorama/sounds/activation.wav" } property SoundEffect focusChangedSound: SoundEffect { source: vrRuntimePath + "content/panorama/sounds/focus_change.wav" - } + }*/ } diff --git a/bin/win64/res/qml/SteamVRPage.qml b/bin/win64/res/qml/SteamVRPage.qml index 33fe8e3..efe357f 100644 --- a/bin/win64/res/qml/SteamVRPage.qml +++ b/bin/win64/res/qml/SteamVRPage.qml @@ -40,7 +40,6 @@ MyStackViewPage { steamvrSupersamplingText.text = val.toFixed(1) } onValueChanged: { - console.debug("Supersampling Slider: valueChanged(", this.value, ")") SteamVRTabController.setSuperSampling(this.value.toFixed(1), false) } } @@ -66,7 +65,6 @@ MyStackViewPage { if (val < 0.1) { val = 0.1 } - console.debug("Supersampling TextField: valueChanged(", val, ")") var v = val.toFixed(1) if (v <= steamvrSupersamplingSlider.to) { steamvrSupersamplingSlider.value = v @@ -109,7 +107,6 @@ MyStackViewPage { steamvrCompositorSupersamplingText.text = val.toFixed(1) } onValueChanged: { - console.debug("Compositor Supersampling Slider: valueChanged(", this.value, ")") SteamVRTabController.setCompositorSuperSampling(this.value.toFixed(1), false) } } @@ -136,7 +133,6 @@ MyStackViewPage { if (val < 0.1) { val = 0.1 } - console.debug("Compositor Supersampling TextField: valueChanged(", val, ")") var v = val.toFixed(1) if (v <= steamvrCompositorSupersamplingSlider.to) { steamvrCompositorSupersamplingSlider.value = v @@ -149,6 +145,14 @@ MyStackViewPage { } } + MyToggleButton { + id: steamvrAllowSupersampleFilteringToggle + text: "Enable Advanced Supersample Filtering" + onCheckedChanged: { + SteamVRTabController.setAllowSupersampleFiltering(this.checked, false) + } + } + MyToggleButton { id: steamvrAllowAsyncReprojectionToggle text: "Allow Asynchronous Reprojection" @@ -217,6 +221,7 @@ MyStackViewPage { steamvrCompositorSupersamplingSlider.value = s2 } steamvrCompositorSupersamplingText.text = s2 + steamvrAllowSupersampleFilteringToggle.checked = SteamVRTabController.allowSupersampleFiltering steamvrAllowInterleavedReprojectionToggle.checked = SteamVRTabController.allowInterleavedReprojection steamvrAllowAsyncReprojectionToggle.checked = SteamVRTabController.allowAsyncReprojection steamvrForceReprojectionToggle.checked = SteamVRTabController.forceReprojection @@ -238,6 +243,9 @@ MyStackViewPage { } steamvrCompositorSupersamplingText.text = s2 } + onAllowSupersampleFilteringChanged: { + steamvrAllowSupersampleFilteringToggle.checked = SteamVRTabController.allowSupersampleFiltering + } onAllowInterleavedReprojectionChanged: { steamvrAllowInterleavedReprojectionToggle.checked = SteamVRTabController.allowInterleavedReprojection } diff --git a/bin/win64/restartvrserver.bat b/bin/win64/restartvrserver.bat index b31de20..332a1e6 100644 --- a/bin/win64/restartvrserver.bat +++ b/bin/win64/restartvrserver.bat @@ -20,4 +20,5 @@ taskkill /im vrdashboard.exe /f >nul 2>nul taskkill /im vrserver.exe /f >nul 2>nul REM Start vrmonitor.exe -start "" "%steamVRPath%\tools\bin\win32\vrmonitor.exe" +REM start "" "%steamVRPath%\bin\win32\vrmonitor.exe" +start "" "%steamVRPath%\bin\win32\vrstartup.exe" diff --git a/docs/screenshots/SteamVRPage.png b/docs/screenshots/SteamVRPage.png index 7141329..ebdedf6 100644 Binary files a/docs/screenshots/SteamVRPage.png and b/docs/screenshots/SteamVRPage.png differ diff --git a/src/overlaycontroller.h b/src/overlaycontroller.h index 4428481..3323081 100644 --- a/src/overlaycontroller.h +++ b/src/overlaycontroller.h @@ -45,7 +45,7 @@ class OverlayController : public QObject { public: static constexpr const char* applicationKey = "matzman666.AdvancedSettings"; static constexpr const char* applicationName = "Advanced Settings"; - static constexpr const char* applicationVersionString = "v2.4"; + static constexpr const char* applicationVersionString = "v2.4.1"; private: vr::VROverlayHandle_t m_ulOverlayHandle = vr::k_ulOverlayHandleInvalid; diff --git a/src/tabcontrollers/SteamVRTabController.cpp b/src/tabcontrollers/SteamVRTabController.cpp index c261ec6..2d5f846 100644 --- a/src/tabcontrollers/SteamVRTabController.cpp +++ b/src/tabcontrollers/SteamVRTabController.cpp @@ -59,6 +59,11 @@ void SteamVRTabController::eventLoopTick() { LOG(WARNING) << "Could not read \"" << vr::k_pch_SteamVR_ForceReprojection_Bool << "\" setting: " << vr::VRSettings()->GetSettingsErrorNameFromEnum(vrSettingsError); } setForceReprojection(fr); + auto sf = vr::VRSettings()->GetBool(vr::k_pch_SteamVR_Section, vrsettings_steamvr_allowSupersampleFiltering, &vrSettingsError); + if (vrSettingsError != vr::VRSettingsError_None) { + LOG(WARNING) << "Could not read \"" << vrsettings_steamvr_allowSupersampleFiltering << "\" setting: " << vr::VRSettings()->GetSettingsErrorNameFromEnum(vrSettingsError); + } + setAllowSupersampleFiltering(sf); settingsUpdateCounter = 0; } else { settingsUpdateCounter++; @@ -164,6 +169,25 @@ void SteamVRTabController::setForceReprojection(bool value, bool notify) { } +bool SteamVRTabController::allowSupersampleFiltering() const { + return m_allowSupersampleFiltering; +} + + +void SteamVRTabController::setAllowSupersampleFiltering(bool value, bool notify) { + if (m_allowSupersampleFiltering != value) { + m_allowSupersampleFiltering = value; + vr::VRSettings()->SetBool(vr::k_pch_SteamVR_Section, vrsettings_steamvr_allowSupersampleFiltering, m_allowSupersampleFiltering); + vr::VRSettings()->Sync(); + if (notify) { + emit allowSupersampleFilteringChanged(m_allowSupersampleFiltering); + } + } +} + + + + void SteamVRTabController::reset() { vr::EVRSettingsError vrSettingsError; @@ -193,6 +217,11 @@ void SteamVRTabController::reset() { LOG(WARNING) << "Could not remove \"" << vr::k_pch_SteamVR_ForceReprojection_Bool << "\" setting: " << vr::VRSettings()->GetSettingsErrorNameFromEnum(vrSettingsError); } + vr::VRSettings()->RemoveKeyInSection(vr::k_pch_SteamVR_Section, vrsettings_steamvr_allowSupersampleFiltering, &vrSettingsError); + if (vrSettingsError != vr::VRSettingsError_None) { + LOG(WARNING) << "Could not remove \"" << vrsettings_steamvr_allowSupersampleFiltering << "\" setting: " << vr::VRSettings()->GetSettingsErrorNameFromEnum(vrSettingsError); + } + vr::VRSettings()->Sync(); settingsUpdateCounter = 999; // Easiest way to get default values } diff --git a/src/tabcontrollers/SteamVRTabController.h b/src/tabcontrollers/SteamVRTabController.h index 054b68a..1803c56 100644 --- a/src/tabcontrollers/SteamVRTabController.h +++ b/src/tabcontrollers/SteamVRTabController.h @@ -8,6 +8,7 @@ //static const char* vrsettings_steamvr_allowInterleavedReprojection = "allowInterleavedReprojection"; static const char* vrsettings_compositor_category = "compositor"; static const char* vrsettings_steamvr_supersampleScale = "supersampleScale"; +static const char* vrsettings_steamvr_allowSupersampleFiltering = "allowSupersampleFiltering"; class QQuickWindow; @@ -25,6 +26,7 @@ class SteamVRTabController : public QObject { Q_PROPERTY(bool allowInterleavedReprojection READ allowInterleavedReprojection WRITE setAllowInterleavedReprojection NOTIFY allowInterleavedReprojectionChanged) Q_PROPERTY(bool allowAsyncReprojection READ allowAsyncReprojection WRITE setAllowAsyncReprojection NOTIFY allowAsyncReprojectionChanged) Q_PROPERTY(bool forceReprojection READ forceReprojection WRITE setForceReprojection NOTIFY forceReprojectionChanged) + Q_PROPERTY(bool allowSupersampleFiltering READ allowSupersampleFiltering WRITE setAllowSupersampleFiltering NOTIFY allowSupersampleFilteringChanged) private: OverlayController* parent; @@ -35,6 +37,7 @@ private: bool m_allowInterleavedReprojection = true; bool m_allowAsyncReprojection = true; bool m_forceReprojection = false; + bool m_allowSupersampleFiltering = true; unsigned settingsUpdateCounter = 0; @@ -49,6 +52,7 @@ public: bool allowInterleavedReprojection() const; bool allowAsyncReprojection() const; bool forceReprojection() const; + bool allowSupersampleFiltering() const; public slots: void setSuperSampling(float value, bool notify = true); @@ -56,6 +60,7 @@ public slots: void setAllowInterleavedReprojection(bool value, bool notify = true); void setAllowAsyncReprojection(bool value, bool notify = true); void setForceReprojection(bool value, bool notify = true); + void setAllowSupersampleFiltering(bool value, bool notify = true); void reset(); void restartSteamVR(); @@ -66,6 +71,7 @@ signals: void allowInterleavedReprojectionChanged(bool value); void allowAsyncReprojectionChanged(bool value); void forceReprojectionChanged(bool value); + void allowSupersampleFilteringChanged(bool value); }; } // namespace advsettings