mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
VideoBackends: Remove depth range clamping hacks.
Oversized depth ranges are handled correctly now, we don't need to hack around them with clamps anymore.
This commit is contained in:
@ -561,10 +561,8 @@ void Renderer::SetViewport()
|
||||
float Y = Renderer::EFBToScaledYf(xfmem.viewport.yOrig + xfmem.viewport.ht - scissorYOff);
|
||||
float Wd = Renderer::EFBToScaledXf(2.0f * xfmem.viewport.wd);
|
||||
float Ht = Renderer::EFBToScaledYf(-2.0f * xfmem.viewport.ht);
|
||||
float range = MathUtil::Clamp<float>(xfmem.viewport.zRange, 0.0f, 16777215.0f);
|
||||
float min_depth =
|
||||
MathUtil::Clamp<float>(xfmem.viewport.farZ - range, 0.0f, 16777215.0f) / 16777216.0f;
|
||||
float max_depth = MathUtil::Clamp<float>(xfmem.viewport.farZ, 0.0f, 16777215.0f) / 16777216.0f;
|
||||
float min_depth = (xfmem.viewport.farZ - xfmem.viewport.zRange) / 16777216.0f;
|
||||
float max_depth = xfmem.viewport.farZ / 16777216.0f;
|
||||
if (Wd < 0.0f)
|
||||
{
|
||||
X += Wd;
|
||||
|
Reference in New Issue
Block a user