Merge pull request #1786 from Armada651/stereo-fixes

Stereo3D: Don't rely on GetEFBLayers() when dealing with shaders.
This commit is contained in:
Ryan Houdek 2014-12-29 06:19:46 -06:00
commit df44b67e64
5 changed files with 5 additions and 7 deletions

View File

@ -149,7 +149,7 @@ static wxString crop_desc = wxTRANSLATE("Crop the picture from 4:3 to 5:4 or fro
static wxString ppshader_desc = wxTRANSLATE("Apply a post-processing effect after finishing a frame.\n\nIf unsure, select (off).");
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_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_depth_desc = wxTRANSLATE("Control 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 distance of the convergence plane, this is the distance at which objects will appear to be in front of the screen.\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.");

View File

@ -36,8 +36,8 @@ ID3D11GeometryShader* CopyGeometryShader = nullptr;
LinearDiskCache<GeometryShaderUid, u8> g_gs_disk_cache;
ID3D11GeometryShader* GeometryShaderCache::GetClearGeometryShader() { return (FramebufferManager::GetEFBLayers() > 1) ? ClearGeometryShader: nullptr; }
ID3D11GeometryShader* GeometryShaderCache::GetCopyGeometryShader() { return (FramebufferManager::GetEFBLayers() > 1) ? CopyGeometryShader : nullptr; }
ID3D11GeometryShader* GeometryShaderCache::GetClearGeometryShader() { return (g_ActiveConfig.iStereoMode > 0) ? ClearGeometryShader: nullptr; }
ID3D11GeometryShader* GeometryShaderCache::GetCopyGeometryShader() { return (g_ActiveConfig.iStereoMode > 0) ? CopyGeometryShader : nullptr; }
ID3D11Buffer* gscbuf = nullptr;

View File

@ -400,7 +400,7 @@ void TextureCache::CompileShaders()
" gl_Position = vec4(rawpos*2.0-1.0, 0.0, 1.0);\n"
"}\n";
const char *GProgram = FramebufferManager::GetEFBLayers() > 1 ?
const char *GProgram = g_ActiveConfig.iStereoMode > 0 ?
"layout(triangles) in;\n"
"layout(triangle_strip, max_vertices = 6) out;\n"
"in vec3 v_uv0[3];\n"

View File

@ -56,7 +56,7 @@ 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.iStereoConvergencePercent / 100.0f);
constants.stereoparams[2] = g_ActiveConfig.iStereoConvergence * (g_ActiveConfig.iStereoConvergencePercentage / 100.0f);
}
else
{

View File

@ -127,8 +127,6 @@ struct VideoConfig final
// Stereoscopy
bool bStereoEFBMonoDepth;
int iStereoSeparationPercent;
int iStereoConvergencePercent;
int iStereoDepthPercentage;
int iStereoConvergencePercentage;