From 29ee1a74e67112aee52f6b5edbbf3ada1bd5b8c2 Mon Sep 17 00:00:00 2001 From: Robin Kertels Date: Sun, 26 Sep 2021 19:51:53 +0200 Subject: [PATCH] Revert "[d3d9] Avoid depth degenerate viewports" This reverts commit 78d22cc7a5e03817ed06002f50120bfe77efcdd3. --- src/d3d9/d3d9_device.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 921f2942..cefce052 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -5442,16 +5442,12 @@ namespace dxvk { // Originally we did this only for powers of two // resolutions but since NEAREST filtering fixed to // truncate, we need to do this all the time now. - constexpr float cf = 0.5f - (1.0f / 128.0f); - - // How much to bias MinZ by to avoid a depth - // degenerate viewport. - constexpr float zBias = 0.001f; + float cf = 0.5f - (1.0f / 128.0f); viewport = VkViewport{ float(vp.X) + cf, float(vp.Height + vp.Y) + cf, float(vp.Width), -float(vp.Height), - vp.MinZ, std::max(vp.MaxZ, vp.MinZ + zBias), + vp.MinZ, vp.MaxZ, }; // Scissor rectangles. Vulkan does not provide an easy way