Commented out reprojection logic

This commit is contained in:
ykeara
2019-01-08 17:33:48 -06:00
parent 16f5438ab0
commit 2fadca76d0
3 changed files with 41 additions and 25 deletions
+8 -5
View File
@@ -307,7 +307,6 @@ MyStackViewPage {
} }
} }
} }
MyToggleButton { MyToggleButton {
id: steamvrAllowSupersampleFilteringToggle id: steamvrAllowSupersampleFilteringToggle
text: "Enable Advanced Supersample Filtering" text: "Enable Advanced Supersample Filtering"
@@ -316,6 +315,8 @@ MyStackViewPage {
} }
} }
//No longer Valid
/*
MyToggleButton { MyToggleButton {
id: steamvrAllowAsyncReprojectionToggle id: steamvrAllowAsyncReprojectionToggle
text: "Allow Asynchronous Reprojection" text: "Allow Asynchronous Reprojection"
@@ -339,7 +340,7 @@ MyStackViewPage {
SteamVRTabController.setForceReprojection(this.checked, false) SteamVRTabController.setForceReprojection(this.checked, false)
} }
} }
*/
Item { Layout.fillHeight: true; Layout.fillWidth: true} Item { Layout.fillHeight: true; Layout.fillWidth: true}
MyText { MyText {
@@ -385,9 +386,9 @@ MyStackViewPage {
} }
steamvrCompositorSupersamplingText.text = s2 steamvrCompositorSupersamplingText.text = s2
steamvrAllowSupersampleFilteringToggle.checked = SteamVRTabController.allowSupersampleFiltering steamvrAllowSupersampleFilteringToggle.checked = SteamVRTabController.allowSupersampleFiltering
steamvrAllowInterleavedReprojectionToggle.checked = SteamVRTabController.allowInterleavedReprojection //steamvrAllowInterleavedReprojectionToggle.checked = SteamVRTabController.allowInterleavedReprojection
steamvrAllowAsyncReprojectionToggle.checked = SteamVRTabController.allowAsyncReprojection //steamvrAllowAsyncReprojectionToggle.checked = SteamVRTabController.allowAsyncReprojection
steamvrForceReprojectionToggle.checked = SteamVRTabController.forceReprojection //steamvrForceReprojectionToggle.checked = SteamVRTabController.forceReprojection
reloadSteamVRProfiles() reloadSteamVRProfiles()
} }
@@ -410,6 +411,7 @@ MyStackViewPage {
onAllowSupersampleFilteringChanged: { onAllowSupersampleFilteringChanged: {
steamvrAllowSupersampleFilteringToggle.checked = SteamVRTabController.allowSupersampleFiltering steamvrAllowSupersampleFilteringToggle.checked = SteamVRTabController.allowSupersampleFiltering
} }
/*
onAllowInterleavedReprojectionChanged: { onAllowInterleavedReprojectionChanged: {
steamvrAllowInterleavedReprojectionToggle.checked = SteamVRTabController.allowInterleavedReprojection steamvrAllowInterleavedReprojectionToggle.checked = SteamVRTabController.allowInterleavedReprojection
} }
@@ -419,6 +421,7 @@ MyStackViewPage {
onForceReprojectionChanged: { onForceReprojectionChanged: {
steamvrForceReprojectionToggle.checked = SteamVRTabController.forceReprojection steamvrForceReprojectionToggle.checked = SteamVRTabController.forceReprojection
} }
*/
onSteamVRProfilesUpdated: { onSteamVRProfilesUpdated: {
reloadSteamVRProfiles() reloadSteamVRProfiles()
} }
+14 -3
View File
@@ -74,6 +74,7 @@ void SteamVRTabController::reloadSteamVRProfiles()
entry.supersampleFiltering entry.supersampleFiltering
= settings->value( "supersampleFiltering", true ).toBool(); = settings->value( "supersampleFiltering", true ).toBool();
} }
/*
entry.includesReprojectionSettings entry.includesReprojectionSettings
= settings->value( "includesReprojectionSettings", false ).toBool(); = settings->value( "includesReprojectionSettings", false ).toBool();
if ( entry.includesReprojectionSettings ) if ( entry.includesReprojectionSettings )
@@ -85,6 +86,7 @@ void SteamVRTabController::reloadSteamVRProfiles()
entry.alwaysOnReprojection entry.alwaysOnReprojection
= settings->value( "alwaysOnReprojection", true ).toBool(); = settings->value( "alwaysOnReprojection", true ).toBool();
} }
*/
} }
settings->endArray(); settings->endArray();
settings->endGroup(); settings->endGroup();
@@ -113,6 +115,7 @@ void SteamVRTabController::saveSteamVRProfiles()
settings->setValue( "supersampleFiltering", settings->setValue( "supersampleFiltering",
p.supersampleFiltering ); p.supersampleFiltering );
} }
/*
settings->setValue( "includesReprojectionSettings", settings->setValue( "includesReprojectionSettings",
p.includesReprojectionSettings ); p.includesReprojectionSettings );
if ( p.includesReprojectionSettings ) if ( p.includesReprojectionSettings )
@@ -124,6 +127,7 @@ void SteamVRTabController::saveSteamVRProfiles()
settings->setValue( "alwaysOnReprojection", settings->setValue( "alwaysOnReprojection",
p.alwaysOnReprojection ); p.alwaysOnReprojection );
} }
*/
i++; i++;
} }
settings->endArray(); settings->endArray();
@@ -210,6 +214,7 @@ void SteamVRTabController::eventLoopTick()
<< m_compositorSuperSampling << " => " << css; << m_compositorSuperSampling << " => " << css;
setCompositorSuperSampling( css ); setCompositorSuperSampling( css );
} }
/*
auto air = vr::VRSettings()->GetBool( auto air = vr::VRSettings()->GetBool(
vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_AllowReprojection_Bool, vr::k_pch_SteamVR_AllowReprojection_Bool,
@@ -249,6 +254,7 @@ void SteamVRTabController::eventLoopTick()
vrSettingsError ); vrSettingsError );
} }
setForceReprojection( fr ); setForceReprojection( fr );
*/
auto sf = vr::VRSettings()->GetBool( auto sf = vr::VRSettings()->GetBool(
vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_Section,
vrsettings_steamvr_allowSupersampleFiltering, vrsettings_steamvr_allowSupersampleFiltering,
@@ -333,7 +339,7 @@ float SteamVRTabController::compositorSuperSampling() const
{ {
return m_compositorSuperSampling; return m_compositorSuperSampling;
} }
/*
bool SteamVRTabController::allowInterleavedReprojection() const bool SteamVRTabController::allowInterleavedReprojection() const
{ {
return m_allowInterleavedReprojection; return m_allowInterleavedReprojection;
@@ -399,7 +405,7 @@ void SteamVRTabController::setForceReprojection( bool value, bool notify )
} }
} }
} }
*/
bool SteamVRTabController::allowSupersampleFiltering() const bool SteamVRTabController::allowSupersampleFiltering() const
{ {
return m_allowSupersampleFiltering; return m_allowSupersampleFiltering;
@@ -452,7 +458,7 @@ void SteamVRTabController::reset()
<< vr::VRSettings()->GetSettingsErrorNameFromEnum( << vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError ); vrSettingsError );
} }
/*
vr::VRSettings()->RemoveKeyInSection( vr::VRSettings()->RemoveKeyInSection(
vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_AllowReprojection_Bool, vr::k_pch_SteamVR_AllowReprojection_Bool,
@@ -492,6 +498,7 @@ void SteamVRTabController::reset()
vrSettingsError ); vrSettingsError );
} }
*/
vr::VRSettings()->RemoveKeyInSection( vr::VRSettings()->RemoveKeyInSection(
vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_Section,
vrsettings_steamvr_allowSupersampleFiltering, vrsettings_steamvr_allowSupersampleFiltering,
@@ -549,6 +556,7 @@ void SteamVRTabController::addSteamVRProfile( QString name,
{ {
profile->supersampleFiltering = m_allowSupersampleFiltering; profile->supersampleFiltering = m_allowSupersampleFiltering;
} }
/*
profile->includesReprojectionSettings = includeReprojectionSettings; profile->includesReprojectionSettings = includeReprojectionSettings;
if ( includeReprojectionSettings ) if ( includeReprojectionSettings )
{ {
@@ -556,6 +564,7 @@ void SteamVRTabController::addSteamVRProfile( QString name,
profile->interleavedReprojection = m_allowInterleavedReprojection; profile->interleavedReprojection = m_allowInterleavedReprojection;
profile->alwaysOnReprojection = m_forceReprojection; profile->alwaysOnReprojection = m_forceReprojection;
} }
*/
saveSteamVRProfiles(); saveSteamVRProfiles();
OverlayController::appSettings()->sync(); OverlayController::appSettings()->sync();
emit steamVRProfilesUpdated(); emit steamVRProfilesUpdated();
@@ -574,12 +583,14 @@ void SteamVRTabController::applySteamVRProfile( unsigned index )
{ {
setAllowSupersampleFiltering( profile.supersampleFiltering ); setAllowSupersampleFiltering( profile.supersampleFiltering );
} }
/*
if ( profile.includesReprojectionSettings ) if ( profile.includesReprojectionSettings )
{ {
setAllowAsyncReprojection( profile.asynchronousReprojection ); setAllowAsyncReprojection( profile.asynchronousReprojection );
setAllowInterleavedReprojection( profile.interleavedReprojection ); setAllowInterleavedReprojection( profile.interleavedReprojection );
setForceReprojection( profile.alwaysOnReprojection ); setForceReprojection( profile.alwaysOnReprojection );
} }
*/
vr::VRSettings()->Sync( true ); vr::VRSettings()->Sync( true );
} }
} }
+19 -17
View File
@@ -20,10 +20,10 @@ struct SteamVRProfile
bool includesSupersampleFiltering = false; bool includesSupersampleFiltering = false;
bool supersampleFiltering = false; bool supersampleFiltering = false;
bool includesReprojectionSettings = false; //bool includesReprojectionSettings = false;
bool asynchronousReprojection = true; //bool asynchronousReprojection = true;
bool interleavedReprojection = true; //bool interleavedReprojection = true;
bool alwaysOnReprojection = true; //bool alwaysOnReprojection = true;
}; };
class SteamVRTabController : public QObject class SteamVRTabController : public QObject
@@ -34,7 +34,8 @@ class SteamVRTabController : public QObject
Q_PROPERTY( Q_PROPERTY(
float compositorSuperSampling READ compositorSuperSampling WRITE float compositorSuperSampling READ compositorSuperSampling WRITE
setCompositorSuperSampling NOTIFY compositorSuperSamplingChanged ) setCompositorSuperSampling NOTIFY compositorSuperSamplingChanged )
Q_PROPERTY( /*
Q_PROPERTY(
bool allowInterleavedReprojection READ allowInterleavedReprojection bool allowInterleavedReprojection READ allowInterleavedReprojection
WRITE setAllowInterleavedReprojection NOTIFY WRITE setAllowInterleavedReprojection NOTIFY
allowInterleavedReprojectionChanged ) allowInterleavedReprojectionChanged )
@@ -43,6 +44,7 @@ class SteamVRTabController : public QObject
setAllowAsyncReprojection NOTIFY allowAsyncReprojectionChanged ) setAllowAsyncReprojection NOTIFY allowAsyncReprojectionChanged )
Q_PROPERTY( bool forceReprojection READ forceReprojection WRITE Q_PROPERTY( bool forceReprojection READ forceReprojection WRITE
setForceReprojection NOTIFY forceReprojectionChanged ) setForceReprojection NOTIFY forceReprojectionChanged )
*/
Q_PROPERTY( bool allowSupersampleFiltering READ allowSupersampleFiltering Q_PROPERTY( bool allowSupersampleFiltering READ allowSupersampleFiltering
WRITE setAllowSupersampleFiltering NOTIFY WRITE setAllowSupersampleFiltering NOTIFY
allowSupersampleFilteringChanged ) allowSupersampleFilteringChanged )
@@ -53,9 +55,9 @@ private:
float m_superSampling = 1.0; float m_superSampling = 1.0;
float m_compositorSuperSampling = 1.0; float m_compositorSuperSampling = 1.0;
bool m_allowInterleavedReprojection = true; //bool m_allowInterleavedReprojection = true;
bool m_allowAsyncReprojection = true; //bool m_allowAsyncReprojection = true;
bool m_forceReprojection = false; //bool m_forceReprojection = false;
bool m_allowSupersampleFiltering = true; bool m_allowSupersampleFiltering = true;
std::vector<SteamVRProfile> steamvrProfiles; std::vector<SteamVRProfile> steamvrProfiles;
@@ -70,9 +72,9 @@ public:
float superSampling() const; float superSampling() const;
float compositorSuperSampling() const; float compositorSuperSampling() const;
bool allowInterleavedReprojection() const; //bool allowInterleavedReprojection() const;
bool allowAsyncReprojection() const; //bool allowAsyncReprojection() const;
bool forceReprojection() const; //bool forceReprojection() const;
bool allowSupersampleFiltering() const; bool allowSupersampleFiltering() const;
void reloadSteamVRProfiles(); void reloadSteamVRProfiles();
@@ -84,9 +86,9 @@ public:
public slots: public slots:
void setSuperSampling( float value, bool notify = true ); void setSuperSampling( float value, bool notify = true );
void setCompositorSuperSampling( float value, bool notify = true ); void setCompositorSuperSampling( float value, bool notify = true );
void setAllowInterleavedReprojection( bool value, bool notify = true ); //void setAllowInterleavedReprojection( bool value, bool notify = true );
void setAllowAsyncReprojection( bool value, bool notify = true ); //void setAllowAsyncReprojection( bool value, bool notify = true );
void setForceReprojection( bool value, bool notify = true ); //void setForceReprojection( bool value, bool notify = true );
void setAllowSupersampleFiltering( bool value, bool notify = true ); void setAllowSupersampleFiltering( bool value, bool notify = true );
void addSteamVRProfile( QString name, void addSteamVRProfile( QString name,
@@ -102,9 +104,9 @@ public slots:
signals: signals:
void superSamplingChanged( float value ); void superSamplingChanged( float value );
void compositorSuperSamplingChanged( float value ); void compositorSuperSamplingChanged( float value );
void allowInterleavedReprojectionChanged( bool value ); //void allowInterleavedReprojectionChanged( bool value );
void allowAsyncReprojectionChanged( bool value ); //void allowAsyncReprojectionChanged( bool value );
void forceReprojectionChanged( bool value ); //void forceReprojectionChanged( bool value );
void allowSupersampleFilteringChanged( bool value ); void allowSupersampleFilteringChanged( bool value );
void steamVRProfilesUpdated(); void steamVRProfilesUpdated();