mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
VideoBackends: Clamp the range to the maximum depth value supported in the z buffer.
This commit is contained in:
@ -1122,7 +1122,7 @@ void Renderer::SetViewport()
|
||||
(float)scissorYOff);
|
||||
float Width = EFBToScaledXf(2.0f * xfmem.viewport.wd);
|
||||
float Height = EFBToScaledYf(-2.0f * xfmem.viewport.ht);
|
||||
float range = MathUtil::Clamp<float>(xfmem.viewport.zRange, -16777216.0f, 16777216.0f);
|
||||
float range = MathUtil::Clamp<float>(xfmem.viewport.zRange, -16777215.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;
|
||||
|
Reference in New Issue
Block a user