Merge pull request #4506 from stenzek/vulkan-no-depth-clamp

Vulkan: Fix viewport depth when depth clamp is unsupported
This commit is contained in:
Stenzek 2016-12-11 01:57:25 +10:00 committed by GitHub
commit 993e029f75
1 changed files with 2 additions and 2 deletions

View File

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