Improved stereoscopic 3D settings

This commit is contained in:
AndrewGDX
2025-11-12 12:29:03 +03:00
parent ac62efaf92
commit 113c86f1b4
12 changed files with 96 additions and 47 deletions
@@ -54,8 +54,7 @@ void GeometryShaderManager::SetConstants(PrimitiveType prim)
if (xfmem.projection.type == ProjectionType::Perspective)
{
float offset = (g_ActiveConfig.iStereoDepth / 1000.0f) *
(g_ActiveConfig.iStereoDepthPercentage / 100.0f);
const float offset = g_ActiveConfig.stereo_depth;
constants.stereoparams[0] = g_ActiveConfig.bStereoSwapEyes ? offset : -offset;
constants.stereoparams[1] = g_ActiveConfig.bStereoSwapEyes ? -offset : offset;
}
@@ -64,8 +63,7 @@ void GeometryShaderManager::SetConstants(PrimitiveType prim)
constants.stereoparams[0] = constants.stereoparams[1] = 0;
}
constants.stereoparams[2] = (float)(g_ActiveConfig.iStereoConvergence *
(g_ActiveConfig.iStereoConvergencePercentage / 100.0f));
constants.stereoparams[2] = g_ActiveConfig.stereo_convergence;
dirty = true;
}