Vulkan: Fix viewport depth when depth clamp is unsupported

This commit is contained in:
Stenzek 2016-12-09 22:45:10 +10:00
parent d7dc854b50
commit af706efaef
1 changed files with 2 additions and 2 deletions

View File

@ -1663,8 +1663,8 @@ void Renderer::SetViewport()
0.0f, 16777215.0f) /
16777216.0f;
float far_val = MathUtil::Clamp<float>(xfmem.viewport.farZ, 0.0f, 16777215.0f) / 16777216.0f;
min_depth = 1.0f - near_val;
max_depth = 1.0f - far_val;
min_depth = near_val;
max_depth = far_val;
}
VkViewport viewport = {x, y, width, height, min_depth, max_depth};