VideoConfig: Define a per-game minimum convergence value instead of a percentage boost.

This commit is contained in:
Jules Blok 2015-01-02 15:27:37 +01:00
parent ec4dfae333
commit b816ee1f79
4 changed files with 8 additions and 4 deletions

View File

@ -368,3 +368,6 @@ EFBCopyEnable = True
[Video_Settings]
FastDepthCalc = False
[Video_Stereoscopy]
StereoConvergenceMinimum = 115

View File

@ -56,13 +56,14 @@ void GeometryShaderManager::SetConstants()
float offset = (g_ActiveConfig.iStereoDepth / 1000.0f) * (g_ActiveConfig.iStereoDepthPercentage / 100.0f);
constants.stereoparams[0] = g_ActiveConfig.bStereoSwapEyes ? offset : -offset;
constants.stereoparams[1] = g_ActiveConfig.bStereoSwapEyes ? -offset : offset;
constants.stereoparams[2] = g_ActiveConfig.iStereoConvergence * (g_ActiveConfig.iStereoConvergencePercentage / 100.0f);
}
else
{
constants.stereoparams[0] = constants.stereoparams[1] = 0;
}
constants.stereoparams[2] = (float)(g_ActiveConfig.iStereoConvergenceMinimum + g_ActiveConfig.iStereoConvergence);
dirty = true;
}

View File

@ -42,7 +42,7 @@ VideoConfig::VideoConfig()
// Game-specific stereoscopy settings
bStereoEFBMonoDepth = false;
iStereoDepthPercentage = 100;
iStereoConvergencePercentage = 100;
iStereoConvergenceMinimum = 0;
}
void VideoConfig::Load(const std::string& ini_file)
@ -191,7 +191,7 @@ void VideoConfig::GameIniLoad()
CHECK_SETTING("Video_Stereoscopy", "StereoEFBMonoDepth", bStereoEFBMonoDepth);
CHECK_SETTING("Video_Stereoscopy", "StereoDepthPercentage", iStereoDepthPercentage);
CHECK_SETTING("Video_Stereoscopy", "StereoConvergencePercentage", iStereoConvergencePercentage);
CHECK_SETTING("Video_Stereoscopy", "StereoConvergenceMinimum", iStereoConvergenceMinimum);
CHECK_SETTING("Video_Hacks", "EFBAccessEnable", bEFBAccessEnable);
CHECK_SETTING("Video_Hacks", "EFBCopyEnable", bEFBCopyEnable);

View File

@ -128,7 +128,7 @@ struct VideoConfig final
// Stereoscopy
bool bStereoEFBMonoDepth;
int iStereoDepthPercentage;
int iStereoConvergencePercentage;
int iStereoConvergenceMinimum;
// D3D only config, mostly to be merged into the above
int iAdapter;