VideoBackends: Enable depth clamping.

This commit is contained in:
Jules Blok
2016-08-03 21:54:22 +02:00
parent b1ed7e80fb
commit e9e81ece65
6 changed files with 7 additions and 21 deletions

View File

@ -484,12 +484,8 @@ void Renderer::SetViewport()
D3D12_VIEWPORT vp = {
x, y, width, height,
1.0f - MathUtil::Clamp<float>(xfmem.viewport.farZ, 0.0f, 16777215.0f) / 16777216.0f,
1.0f -
MathUtil::Clamp<float>(xfmem.viewport.farZ - MathUtil::Clamp<float>(xfmem.viewport.zRange,
0.0f, 16777216.0f),
0.0f, 16777215.0f) /
16777216.0f};
D3D12_MIN_DEPTH,
16777215.0f / 16777216.0f };
D3D::current_command_list->RSSetViewports(1, &vp);
}