mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
VideoConfig: Add separation and convergence modifiers to the game ini.
This commit is contained in:
@ -515,10 +515,10 @@ void VertexShaderManager::SetConstants()
|
|||||||
|
|
||||||
if (g_ActiveConfig.iStereoMode > 0 && xfmem.projection.type == GX_PERSPECTIVE)
|
if (g_ActiveConfig.iStereoMode > 0 && xfmem.projection.type == GX_PERSPECTIVE)
|
||||||
{
|
{
|
||||||
float offset = g_ActiveConfig.iStereoSeparation / 10000.0f;
|
float offset = (g_ActiveConfig.iStereoSeparation / 10000.0f) * (g_ActiveConfig.iStereoSeparationPercent / 100.0f);
|
||||||
constants.stereoparams[0] = (g_ActiveConfig.bStereoSwapEyes) ? offset : -offset;
|
constants.stereoparams[0] = (g_ActiveConfig.bStereoSwapEyes) ? offset : -offset;
|
||||||
constants.stereoparams[1] = (g_ActiveConfig.bStereoSwapEyes) ? -offset : offset;
|
constants.stereoparams[1] = (g_ActiveConfig.bStereoSwapEyes) ? -offset : offset;
|
||||||
constants.stereoparams[2] = (float)g_ActiveConfig.iStereoConvergence;
|
constants.stereoparams[2] = g_ActiveConfig.iStereoConvergence * (g_ActiveConfig.iStereoConvergencePercent / 100.0f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,8 @@ VideoConfig::VideoConfig()
|
|||||||
|
|
||||||
// Game-specific stereoscopy settings
|
// Game-specific stereoscopy settings
|
||||||
bStereoMonoEFBDepth = false;
|
bStereoMonoEFBDepth = false;
|
||||||
|
iStereoSeparationPercent = 100;
|
||||||
|
iStereoConvergencePercent = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoConfig::Load(const std::string& ini_file)
|
void VideoConfig::Load(const std::string& ini_file)
|
||||||
@ -186,6 +188,8 @@ void VideoConfig::GameIniLoad()
|
|||||||
CHECK_SETTING("Video_Enhancements", "StereoSwapEyes", bStereoSwapEyes);
|
CHECK_SETTING("Video_Enhancements", "StereoSwapEyes", bStereoSwapEyes);
|
||||||
|
|
||||||
CHECK_SETTING("Video_Stereoscopy", "StereoMonoEFBDepth", bStereoMonoEFBDepth);
|
CHECK_SETTING("Video_Stereoscopy", "StereoMonoEFBDepth", bStereoMonoEFBDepth);
|
||||||
|
CHECK_SETTING("Video_Stereoscopy", "StereoSeparationPercent", iStereoSeparationPercent);
|
||||||
|
CHECK_SETTING("Video_Stereoscopy", "StereoConvergencePercent", iStereoConvergencePercent);
|
||||||
|
|
||||||
CHECK_SETTING("Video_Hacks", "EFBAccessEnable", bEFBAccessEnable);
|
CHECK_SETTING("Video_Hacks", "EFBAccessEnable", bEFBAccessEnable);
|
||||||
CHECK_SETTING("Video_Hacks", "EFBCopyEnable", bEFBCopyEnable);
|
CHECK_SETTING("Video_Hacks", "EFBCopyEnable", bEFBCopyEnable);
|
||||||
|
@ -126,6 +126,8 @@ struct VideoConfig final
|
|||||||
|
|
||||||
// Stereoscopy
|
// Stereoscopy
|
||||||
bool bStereoMonoEFBDepth;
|
bool bStereoMonoEFBDepth;
|
||||||
|
int iStereoSeparationPercent;
|
||||||
|
int iStereoConvergencePercent;
|
||||||
|
|
||||||
// D3D only config, mostly to be merged into the above
|
// D3D only config, mostly to be merged into the above
|
||||||
int iAdapter;
|
int iAdapter;
|
||||||
|
Reference in New Issue
Block a user