removed compositor super sampling added error checking for motion smoothing
This commit is contained in:
@@ -239,7 +239,7 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 16
|
spacing: 16
|
||||||
|
|
||||||
@@ -307,6 +307,7 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
MyToggleButton {
|
MyToggleButton {
|
||||||
id: steamvrAllowSupersampleFilteringToggle
|
id: steamvrAllowSupersampleFilteringToggle
|
||||||
text: "Enable Advanced Supersample Filtering"
|
text: "Enable Advanced Supersample Filtering"
|
||||||
@@ -381,6 +382,7 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
steamvrSupersamplingText.text = s1
|
steamvrSupersamplingText.text = s1
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
onCompositorSuperSamplingChanged: {
|
onCompositorSuperSamplingChanged: {
|
||||||
var s2 = SteamVRTabController.compositorSuperSampling.toFixed(1)
|
var s2 = SteamVRTabController.compositorSuperSampling.toFixed(1)
|
||||||
if (s2 <= steamvrCompositorSupersamplingSlider.to && Math.abs(steamvrCompositorSupersamplingSlider.value-s2) > 0.08) {
|
if (s2 <= steamvrCompositorSupersamplingSlider.to && Math.abs(steamvrCompositorSupersamplingSlider.value-s2) > 0.08) {
|
||||||
@@ -388,6 +390,7 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
steamvrCompositorSupersamplingText.text = s2
|
steamvrCompositorSupersamplingText.text = s2
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
onAllowSupersampleFilteringChanged: {
|
onAllowSupersampleFilteringChanged: {
|
||||||
steamvrAllowSupersampleFilteringToggle.checked = SteamVRTabController.allowSupersampleFiltering
|
steamvrAllowSupersampleFilteringToggle.checked = SteamVRTabController.allowSupersampleFiltering
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace advsettings
|
|||||||
|
|
||||||
//static const char* vrsettings_steamvr_supersampleScale = "supersampleScale";
|
//static const char* vrsettings_steamvr_supersampleScale = "supersampleScale";
|
||||||
//static const char* vrsettings_steamvr_allowSupersampleFiltering = "allowSupersampleFiltering";
|
//static const char* vrsettings_steamvr_allowSupersampleFiltering = "allowSupersampleFiltering";
|
||||||
static const char* vrsettings_compositor_category = "compositor";
|
//static const char* vrsettings_compositor_category = "compositor";
|
||||||
|
|
||||||
void SteamVRTabController::initStage1()
|
void SteamVRTabController::initStage1()
|
||||||
{
|
{
|
||||||
@@ -139,7 +139,7 @@ Q_INVOKABLE QString
|
|||||||
return QString::fromStdString( steamvrProfiles[index].profileName );
|
return QString::fromStdString( steamvrProfiles[index].profileName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//TODO
|
//TODO DISC does it make any sense to check these settings once every ~ 1second?
|
||||||
void SteamVRTabController::eventLoopTick()
|
void SteamVRTabController::eventLoopTick()
|
||||||
{
|
{
|
||||||
if ( settingsUpdateCounter >= 50 )
|
if ( settingsUpdateCounter >= 50 )
|
||||||
@@ -170,38 +170,7 @@ void SteamVRTabController::eventLoopTick()
|
|||||||
<< m_superSampling << " => " << ss;
|
<< m_superSampling << " => " << ss;
|
||||||
setSuperSampling( ss );
|
setSuperSampling( ss );
|
||||||
}
|
}
|
||||||
auto css = vr::VRSettings()->GetFloat(
|
|
||||||
vrsettings_compositor_category,
|
|
||||||
vr::k_pch_SteamVR_RenderTargetMultiplier_Float,
|
|
||||||
&vrSettingsError );
|
|
||||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
|
||||||
{
|
|
||||||
if ( vrSettingsError
|
|
||||||
!= vr::VRSettingsError_UnsetSettingHasNoDefault )
|
|
||||||
{ // does not appear in the default settings file as of beta
|
|
||||||
// 1477423729
|
|
||||||
LOG( WARNING )
|
|
||||||
<< "Could not read \"compositor::"
|
|
||||||
<< vr::k_pch_SteamVR_RenderTargetMultiplier_Float
|
|
||||||
<< "\" setting: "
|
|
||||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
|
||||||
vrSettingsError );
|
|
||||||
}
|
|
||||||
if ( m_compositorSuperSampling != 1.0 )
|
|
||||||
{
|
|
||||||
LOG( DEBUG ) << "OpenVR returns an error and we have a custom "
|
|
||||||
"compositor supersampling value: "
|
|
||||||
<< m_compositorSuperSampling;
|
|
||||||
setCompositorSuperSampling( 1.0 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ( m_compositorSuperSampling != css )
|
|
||||||
{
|
|
||||||
LOG( DEBUG )
|
|
||||||
<< "OpenVR reports a changed compositor supersampling value: "
|
|
||||||
<< m_compositorSuperSampling << " => " << css;
|
|
||||||
setCompositorSuperSampling( css );
|
|
||||||
}
|
|
||||||
auto sf = vr::VRSettings()->GetBool(
|
auto sf = vr::VRSettings()->GetBool(
|
||||||
vr::k_pch_SteamVR_Section,
|
vr::k_pch_SteamVR_Section,
|
||||||
vr::k_pch_SteamVR_AllowSupersampleFiltering_Bool,
|
vr::k_pch_SteamVR_AllowSupersampleFiltering_Bool,
|
||||||
@@ -215,7 +184,24 @@ void SteamVRTabController::eventLoopTick()
|
|||||||
vrSettingsError );
|
vrSettingsError );
|
||||||
}
|
}
|
||||||
setAllowSupersampleFiltering( sf );
|
setAllowSupersampleFiltering( sf );
|
||||||
|
|
||||||
|
//Checks if Motion smoothing setting can be read
|
||||||
|
auto ms = vr::VRSettings()->GetBool(
|
||||||
|
vr::k_pch_SteamVR_Section,
|
||||||
|
vr::k_pch_SteamVR_MotionSmoothing_Bool,
|
||||||
|
&vrSettingsError);
|
||||||
|
if (vrSettingsError != vr::VRSettingsError_None)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "Could not read \""
|
||||||
|
<< vr::k_pch_SteamVR_MotionSmoothing_Bool
|
||||||
|
<< "\" setting: "
|
||||||
|
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
||||||
|
vrSettingsError);
|
||||||
|
}
|
||||||
|
setMotionSmoothing(ms);
|
||||||
|
|
||||||
settingsUpdateCounter = 0;
|
settingsUpdateCounter = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -248,7 +234,7 @@ void SteamVRTabController::setSuperSampling( float value, bool notify )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
void SteamVRTabController::setCompositorSuperSampling( float value,
|
void SteamVRTabController::setCompositorSuperSampling( float value,
|
||||||
bool notify )
|
bool notify )
|
||||||
{
|
{
|
||||||
@@ -276,16 +262,18 @@ void SteamVRTabController::setCompositorSuperSampling( float value,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
float SteamVRTabController::superSampling() const
|
float SteamVRTabController::superSampling() const
|
||||||
{
|
{
|
||||||
return m_superSampling;
|
return m_superSampling;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
float SteamVRTabController::compositorSuperSampling() const
|
float SteamVRTabController::compositorSuperSampling() const
|
||||||
{
|
{
|
||||||
return m_compositorSuperSampling;
|
return m_compositorSuperSampling;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
bool SteamVRTabController::motionSmoothing() const
|
bool SteamVRTabController::motionSmoothing() const
|
||||||
{
|
{
|
||||||
@@ -394,6 +382,7 @@ void SteamVRTabController::reset()
|
|||||||
vrSettingsError );
|
vrSettingsError );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
setCompositorSuperSampling( 1.0f ); // Is not in default.vrsettings yet
|
setCompositorSuperSampling( 1.0f ); // Is not in default.vrsettings yet
|
||||||
vr::VRSettings()->RemoveKeyInSection(
|
vr::VRSettings()->RemoveKeyInSection(
|
||||||
vrsettings_compositor_category,
|
vrsettings_compositor_category,
|
||||||
@@ -408,6 +397,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,
|
||||||
|
|||||||
@@ -28,9 +28,10 @@ class SteamVRTabController : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY( float superSampling READ superSampling WRITE setSuperSampling
|
Q_PROPERTY( float superSampling READ superSampling WRITE setSuperSampling
|
||||||
NOTIFY superSamplingChanged )
|
NOTIFY superSamplingChanged )
|
||||||
Q_PROPERTY(
|
/*Q_PROPERTY(
|
||||||
float compositorSuperSampling READ compositorSuperSampling WRITE
|
float compositorSuperSampling READ compositorSuperSampling WRITE
|
||||||
setCompositorSuperSampling NOTIFY compositorSuperSamplingChanged )
|
setCompositorSuperSampling NOTIFY compositorSuperSamplingChanged )
|
||||||
|
*/
|
||||||
|
|
||||||
Q_PROPERTY( bool motionSmoothing READ motionSmoothing WRITE
|
Q_PROPERTY( bool motionSmoothing READ motionSmoothing WRITE
|
||||||
setMotionSmoothing NOTIFY motionSmoothingChanged )
|
setMotionSmoothing NOTIFY motionSmoothingChanged )
|
||||||
@@ -43,7 +44,7 @@ private:
|
|||||||
QQuickWindow* widget;
|
QQuickWindow* widget;
|
||||||
|
|
||||||
float m_superSampling = 1.0;
|
float m_superSampling = 1.0;
|
||||||
float m_compositorSuperSampling = 1.0;
|
//float m_compositorSuperSampling = 1.0;
|
||||||
bool m_motionSmoothing = true;
|
bool m_motionSmoothing = true;
|
||||||
bool m_allowSupersampleFiltering = true;
|
bool m_allowSupersampleFiltering = true;
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@ public:
|
|||||||
void eventLoopTick();
|
void eventLoopTick();
|
||||||
|
|
||||||
float superSampling() const;
|
float superSampling() const;
|
||||||
float compositorSuperSampling() const;
|
//float compositorSuperSampling() const;
|
||||||
bool motionSmoothing() const;
|
bool motionSmoothing() const;
|
||||||
bool allowSupersampleFiltering() const;
|
bool allowSupersampleFiltering() const;
|
||||||
|
|
||||||
@@ -72,7 +73,7 @@ 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 setMotionSmoothing( bool value, bool notify = true );
|
void setMotionSmoothing( bool value, bool notify = true );
|
||||||
void setAllowSupersampleFiltering( bool value, bool notify = true );
|
void setAllowSupersampleFiltering( bool value, bool notify = true );
|
||||||
|
|
||||||
@@ -88,7 +89,7 @@ public slots:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void superSamplingChanged( float value );
|
void superSamplingChanged( float value );
|
||||||
void compositorSuperSamplingChanged( float value );
|
//void compositorSuperSamplingChanged( float value );
|
||||||
void motionSmoothingChanged( bool value );
|
void motionSmoothingChanged( bool value );
|
||||||
void allowSupersampleFilteringChanged( bool value );
|
void allowSupersampleFilteringChanged( bool value );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user