Skip to content

Commit

Permalink
VideoConfig: Further optimize convergence and separation values and u…
Browse files Browse the repository at this point in the history
…pdate their descriptions.

Previous convergence distance was much too large.
  • Loading branch information
CrossVR committed Nov 27, 2014
1 parent b3c6602 commit 6d51455
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions Source/Core/DolphinWX/Frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1130,18 +1130,18 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
}
else if (IsHotkey(event, HK_DECREASE_SEPARATION))
{
if (--g_Config.iStereoSeparation < 10)
g_Config.iStereoSeparation = 10;
if (--g_Config.iStereoSeparation < 0)
g_Config.iStereoSeparation = 0;
}
else if (IsHotkey(event, HK_INCREASE_CONVERGENCE))
{
if (++g_Config.iStereoConvergence > 200)
g_Config.iStereoConvergence = 200;
if (++g_Config.iStereoConvergence > 500)
g_Config.iStereoConvergence = 500;
}
else if (IsHotkey(event, HK_DECREASE_CONVERGENCE))
{
if (--g_Config.iStereoConvergence < 10)
g_Config.iStereoConvergence = 10;
if (--g_Config.iStereoConvergence < 0)
g_Config.iStereoConvergence = 0;
}

else
Expand Down
8 changes: 4 additions & 4 deletions Source/Core/DolphinWX/VideoConfigDiag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ static wxString ppshader_desc = wxTRANSLATE("Apply a post-processing effect afte
static wxString cache_efb_copies_desc = wxTRANSLATE("Slightly speeds up EFB to RAM copies by sacrificing emulation accuracy.\nSometimes also increases visual quality.\nIf you're experiencing any issues, try raising texture cache accuracy or disable this option.\n\nIf unsure, leave this unchecked.");
static wxString shader_errors_desc = wxTRANSLATE("Usually if shader compilation fails, an error message is displayed.\nHowever, one may skip the popups to allow interruption free gameplay by checking this option.\n\nIf unsure, leave this unchecked.");
static wxString stereo_3d_desc = wxTRANSLATE("Select the stereoscopic 3D mode, stereoscopy allows you to get a better feeling of depth if you have the necessary hardware.\nSide-by-Side and Top-and-Bottom are used by most 3D TVs.\nAnaglyph is used for Red-Cyan colored glasses.\nHeavily decreases emulation speed and sometimes causes issues.\n\nIf unsure, select Off.");
static wxString stereo_separation_desc = wxTRANSLATE("Control the interpupillary distance, this is the distance between the virtual eyes.");
static wxString stereo_convergence_desc = wxTRANSLATE("Control the convergence distance, this controls the apparant distance of virtual objects.\nA higher value creates a stronger feeling of depth while a lower value is generally more comfortable.");
static wxString stereo_separation_desc = wxTRANSLATE("Control the separation distance, this is the distance between the virtual cameras.\nA higher value creates a stronger feeling of depth while a lower value is more comfortable.");
static wxString stereo_convergence_desc = wxTRANSLATE("Control the convergence distance, this controls the apparant distance of virtual objects.\nA higher value creates stronger out-of-screen effects while a lower value is more comfortable.");
static wxString stereo_swap_desc = wxTRANSLATE("Swap the left and right eye, mostly useful if you want to view side-by-side cross-eyed.\n\nIf unsure, leave this unchecked.");


Expand Down Expand Up @@ -457,14 +457,14 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
szr_stereo->Add(new wxStaticText(page_enh, -1, _("Stereoscopic 3D Mode:")), 1, wxALIGN_CENTER_VERTICAL, 0);
szr_stereo->Add(CreateChoice(page_enh, vconfig.iStereoMode, wxGetTranslation(stereo_3d_desc), 4, stereo_choices));

wxSlider* const sep_slider = new wxSlider(page_enh, wxID_ANY, vconfig.iStereoSeparation, 10, 100, wxDefaultPosition, wxDefaultSize);
wxSlider* const sep_slider = new wxSlider(page_enh, wxID_ANY, vconfig.iStereoSeparation, 0, 100, wxDefaultPosition, wxDefaultSize);
sep_slider->Bind(wxEVT_SLIDER, &VideoConfigDiag::Event_StereoSep, this);
RegisterControl(sep_slider, wxGetTranslation(stereo_separation_desc));

szr_stereo->Add(new wxStaticText(page_enh, wxID_ANY, _("Separation:")), 1, wxALIGN_CENTER_VERTICAL, 0);
szr_stereo->Add(sep_slider, 0, wxEXPAND | wxRIGHT);

wxSlider* const conv_slider = new wxSlider(page_enh, wxID_ANY, vconfig.iStereoConvergence, 10, 200, wxDefaultPosition, wxDefaultSize);
wxSlider* const conv_slider = new wxSlider(page_enh, wxID_ANY, vconfig.iStereoConvergence, 0, 500, wxDefaultPosition, wxDefaultSize);
conv_slider->Bind(wxEVT_SLIDER, &VideoConfigDiag::Event_StereoFoc, this);
RegisterControl(conv_slider, wxGetTranslation(stereo_convergence_desc));

Expand Down
4 changes: 2 additions & 2 deletions Source/Core/VideoCommon/VertexShaderManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,10 @@ void VertexShaderManager::SetConstants()

if (g_ActiveConfig.iStereoMode > 0 && xfmem.projection.type == GX_PERSPECTIVE)
{
float offset = (g_ActiveConfig.iStereoSeparation / 10000.0f) * (g_ActiveConfig.iStereoSeparationPercent / 100.0f);
float offset = (g_ActiveConfig.iStereoSeparation / 1000.0f) * (g_ActiveConfig.iStereoSeparationPercent / 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.iStereoConvergencePercent / 100.0f);
constants.stereoparams[2] = (g_ActiveConfig.iStereoConvergence / 10.0f) * (g_ActiveConfig.iStereoConvergencePercent / 100.0f);
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/VideoCommon/VideoConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ void VideoConfig::Load(const std::string& ini_file)
enhancements->Get("MaxAnisotropy", &iMaxAnisotropy, 0); // NOTE - this is x in (1 << x)
enhancements->Get("PostProcessingShader", &sPostProcessingShader, "");
enhancements->Get("StereoMode", &iStereoMode, 0);
enhancements->Get("StereoSeparation", &iStereoSeparation, 50);
enhancements->Get("StereoConvergence", &iStereoConvergence, 30);
enhancements->Get("StereoSeparation", &iStereoSeparation, 20);
enhancements->Get("StereoConvergence", &iStereoConvergence, 20);
enhancements->Get("StereoSwapEyes", &bStereoSwapEyes, false);

IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks");
Expand Down

0 comments on commit 6d51455

Please sign in to comment.