diff --git a/Source/Core/VideoBackends/D3D/main.cpp b/Source/Core/VideoBackends/D3D/main.cpp index dc378a7073..7671e3a027 100644 --- a/Source/Core/VideoBackends/D3D/main.cpp +++ b/Source/Core/VideoBackends/D3D/main.cpp @@ -83,7 +83,7 @@ void InitBackendInfo() g_Config.backend_info.bSupports3DVision = true; g_Config.backend_info.bSupportsPostProcessing = false; g_Config.backend_info.bSupportsPaletteConversion = true; - g_Config.backend_info.bSupportsClipControl = false; + g_Config.backend_info.bSupportsClipControl = true; g_Config.backend_info.bSupportsCopySubImage = true; IDXGIFactory* factory; diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 6dae1216d7..85e7956b09 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -1202,7 +1202,7 @@ void Renderer::SetViewport() float Y = EFBToScaledYf((float)EFB_HEIGHT - xfmem.viewport.yOrig + xfmem.viewport.ht + (float)scissorYOff); float Width = EFBToScaledXf(2.0f * xfmem.viewport.wd); float Height = EFBToScaledYf(-2.0f * xfmem.viewport.ht); - float GLNear = MathUtil::Clamp(xfmem.viewport.farZ - MathUtil::Clamp(xfmem.viewport.zRange, 0.0f, 16777215.0f), 0.0f, 16777215.0f) / 16777216.0f; + float GLNear = MathUtil::Clamp(xfmem.viewport.farZ - MathUtil::Clamp(xfmem.viewport.zRange, -16777215.0f, 16777215.0f), 0.0f, 16777215.0f) / 16777216.0f; float GLFar = MathUtil::Clamp(xfmem.viewport.farZ, 0.0f, 16777215.0f) / 16777216.0f; if (Width < 0) { diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp index 084ac48aaf..97ac15e887 100644 --- a/Source/Core/VideoCommon/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/VertexShaderGen.cpp @@ -383,10 +383,6 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ { out.Write("o.pos.z = -o.pos.z;\n"); } - else if (api_type == API_D3D) - { - out.Write("o.pos.z = -o.pos.z;\n"); - } else // OGL { // this results in a scale from -1..0 to -1..1 after perspective