mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
OGL: Handle cases where reversed depth is already used.
This commit is contained in:
parent
92f165d756
commit
a8a9348913
6 changed files with 32 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue