mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-12 04:22:15 +00:00
VertexShaderManager: Add stereoscopy options to swap the left and right eye.
This commit is contained in:
parent
c3ad6e7820
commit
1261bd02ca
4 changed files with 9 additions and 2 deletions
|
@ -516,8 +516,8 @@ void VertexShaderManager::SetConstants()
|
|||
if (g_ActiveConfig.iStereoMode > 0 && xfmem.projection.type == GX_PERSPECTIVE)
|
||||
{
|
||||
float offset = g_ActiveConfig.iStereoSeparation / (200.0f * g_ActiveConfig.iStereoFocalLength);
|
||||
constants.stereooffset[0] = offset;
|
||||
constants.stereooffset[1] = -offset;
|
||||
constants.stereooffset[0] = (g_ActiveConfig.bStereoSwapEyes) ? -offset : offset;
|
||||
constants.stereooffset[1] = (g_ActiveConfig.bStereoSwapEyes) ? offset : -offset;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -69,6 +69,7 @@ void VideoConfig::Load(const std::string& ini_file)
|
|||
settings->Get("StereoMode", &iStereoMode, 0);
|
||||
settings->Get("StereoSeparation", &iStereoSeparation, 65);
|
||||
settings->Get("StereoFocalLength", &iStereoFocalLength, 100);
|
||||
settings->Get("StereoSwapEyes", &bStereoSwapEyes, false);
|
||||
settings->Get("EnablePixelLighting", &bEnablePixelLighting, 0);
|
||||
settings->Get("FastDepthCalc", &bFastDepthCalc, true);
|
||||
settings->Get("MSAA", &iMultisampleMode, 0);
|
||||
|
@ -143,6 +144,7 @@ void VideoConfig::GameIniLoad()
|
|||
CHECK_SETTING("Video_Settings", "StereoMode", iStereoMode);
|
||||
CHECK_SETTING("Video_Settings", "StereoSeparation", iStereoSeparation);
|
||||
CHECK_SETTING("Video_Settings", "StereoFocalLength", iStereoFocalLength);
|
||||
CHECK_SETTING("Video_Settings", "StereoSwapEyes", bStereoSwapEyes);
|
||||
CHECK_SETTING("Video_Settings", "EnablePixelLighting", bEnablePixelLighting);
|
||||
CHECK_SETTING("Video_Settings", "FastDepthCalc", bFastDepthCalc);
|
||||
CHECK_SETTING("Video_Settings", "MSAA", iMultisampleMode);
|
||||
|
@ -234,6 +236,7 @@ void VideoConfig::Save(const std::string& ini_file)
|
|||
settings->Set("StereoMode", iStereoMode);
|
||||
settings->Set("StereoSeparation", iStereoSeparation);
|
||||
settings->Set("StereoFocalLength", iStereoFocalLength);
|
||||
settings->Set("StereoSwapEyes", bStereoSwapEyes);
|
||||
settings->Set("EnablePixelLighting", bEnablePixelLighting);
|
||||
settings->Set("FastDepthCalc", bFastDepthCalc);
|
||||
settings->Set("ShowEFBCopyRegions", bShowEFBCopyRegions);
|
||||
|
|
|
@ -81,6 +81,7 @@ struct VideoConfig final
|
|||
int iStereoMode;
|
||||
int iStereoSeparation;
|
||||
int iStereoFocalLength;
|
||||
bool bStereoSwapEyes;
|
||||
|
||||
// Information
|
||||
bool bShowFPS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue