From a5704344b65d259e349b8412682e955f07d2d06b Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 13 Dec 2019 11:46:10 +0000 Subject: [PATCH] Always remap depth textures to RGBA32F if needed --- renderdoc/core/replay_proxy.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/renderdoc/core/replay_proxy.cpp b/renderdoc/core/replay_proxy.cpp index ea3d56154..7bec518cc 100644 --- a/renderdoc/core/replay_proxy.cpp +++ b/renderdoc/core/replay_proxy.cpp @@ -2206,8 +2206,12 @@ void ReplayProxy::RemapProxyTextureIfNeeded(TextureDescription &tex, GetTextureD else params.remap = RemapTexture::RGBA32; + // always remap depth to RGBA32F, because D16_UNORM will lose precision if remapped to R16_FLOAT if(tex.format.compType == CompType::Depth) + { + params.remap = RemapTexture::RGBA32; tex.format.compType = CompType::Float; + } } tex.format.SetBGRAOrder(false);