D3D: Viewport min and max depth is now clamped to [0..1] range
This commit is contained in:
parent
a886d8a8ee
commit
36b886cb80
|
@ -486,8 +486,8 @@ void Renderer::SetViewport()
|
|||
Ht = (Y + Ht <= GetTargetHeight()) ? Ht : (GetTargetHeight() - Y);
|
||||
|
||||
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(X, Y, Wd, Ht,
|
||||
(xfmem.viewport.farZ - xfmem.viewport.zRange) / 16777216.0f,
|
||||
xfmem.viewport.farZ / 16777216.0f);
|
||||
std::max(0.0f, std::min(1.0f, (xfmem.viewport.farZ - xfmem.viewport.zRange) / 16777216.0f)),
|
||||
std::max(0.0f, std::min(1.0f, xfmem.viewport.farZ / 16777216.0f)));
|
||||
D3D::context->RSSetViewports(1, &vp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue