mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
OGL: Handle cases where reversed depth is already used.
This commit is contained in:
@ -1160,9 +1160,16 @@ void Renderer::SetViewport()
|
||||
// value supported by the console GPU. If not, we simply clamp the near/far values
|
||||
// themselves to the maximum value as done above.
|
||||
if (g_ActiveConfig.backend_info.bSupportsDepthClamp)
|
||||
glDepthRangef(GX_MAX_DEPTH, 0.0f);
|
||||
{
|
||||
if (xfmem.viewport.zRange < 0.0f)
|
||||
glDepthRangef(0.0f, GX_MAX_DEPTH);
|
||||
else
|
||||
glDepthRangef(GX_MAX_DEPTH, 0.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
glDepthRangef(GLFar, GLNear);
|
||||
}
|
||||
}
|
||||
|
||||
void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaEnable, bool zEnable,
|
||||
|
@ -102,6 +102,7 @@ void VideoBackend::InitBackendInfo()
|
||||
g_Config.backend_info.bSupports3DVision = false;
|
||||
g_Config.backend_info.bSupportsPostProcessing = true;
|
||||
g_Config.backend_info.bSupportsSSAA = true;
|
||||
g_Config.backend_info.bSupportsReversedDepthRange = true;
|
||||
|
||||
// Overwritten in Render.cpp later
|
||||
g_Config.backend_info.bSupportsDualSourceBlend = true;
|
||||
|
Reference in New Issue
Block a user