From b816ee1f79a6c4f8a2f05f0da91a936ee2d44fff Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Fri, 2 Jan 2015 15:27:37 +0100 Subject: [PATCH] VideoConfig: Define a per-game minimum convergence value instead of a percentage boost. --- Data/Sys/GameSettings/GZLE01.ini | 3 +++ Source/Core/VideoCommon/GeometryShaderManager.cpp | 3 ++- Source/Core/VideoCommon/VideoConfig.cpp | 4 ++-- Source/Core/VideoCommon/VideoConfig.h | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Data/Sys/GameSettings/GZLE01.ini b/Data/Sys/GameSettings/GZLE01.ini index 1efac5d492..3f3055b953 100644 --- a/Data/Sys/GameSettings/GZLE01.ini +++ b/Data/Sys/GameSettings/GZLE01.ini @@ -368,3 +368,6 @@ EFBCopyEnable = True [Video_Settings] FastDepthCalc = False + +[Video_Stereoscopy] +StereoConvergenceMinimum = 115 diff --git a/Source/Core/VideoCommon/GeometryShaderManager.cpp b/Source/Core/VideoCommon/GeometryShaderManager.cpp index 1d7d5ec029..3e96592625 100644 --- a/Source/Core/VideoCommon/GeometryShaderManager.cpp +++ b/Source/Core/VideoCommon/GeometryShaderManager.cpp @@ -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; } diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index 5448d0c4b0..b9bf69bf9d 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -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); diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h index d868ae5293..0d7f1c51e9 100644 --- a/Source/Core/VideoCommon/VideoConfig.h +++ b/Source/Core/VideoCommon/VideoConfig.h @@ -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;