mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -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,
|
||||
|
Reference in New Issue
Block a user