mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Merge pull request #4506 from stenzek/vulkan-no-depth-clamp
Vulkan: Fix viewport depth when depth clamp is unsupported
This commit is contained in:
commit
993e029f75
@ -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};
|
||||||
|
Loading…
Reference in New Issue
Block a user