OGL: Allow inverted depth ranges.
This commit is contained in:
parent
6274cdb478
commit
743296f1c4
|
@ -1197,7 +1197,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<float>(xfmem.viewport.farZ - MathUtil::Clamp<float>(xfmem.viewport.zRange, 0.0f, 16777215.0f), 0.0f, 16777215.0f) / 16777216.0f;
|
||||
float GLNear = MathUtil::Clamp<float>(xfmem.viewport.farZ - MathUtil::Clamp<float>(xfmem.viewport.zRange, -16777215.0f, 16777215.0f), 0.0f, 16777215.0f) / 16777216.0f;
|
||||
float GLFar = MathUtil::Clamp<float>(xfmem.viewport.farZ, 0.0f, 16777215.0f) / 16777216.0f;
|
||||
if (Width < 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue