From 38117e08e4c21dcc90b141cede196b02814f6cae Mon Sep 17 00:00:00 2001 From: Steve Karolewics Date: Tue, 7 Jan 2020 15:40:43 -0800 Subject: [PATCH] Ensure resources viewed as sRGB with D3D12 display as sRGB --- renderdoc/driver/d3d12/d3d12_rendertexture.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/d3d12/d3d12_rendertexture.cpp b/renderdoc/driver/d3d12/d3d12_rendertexture.cpp index 70c0a7f72..7dc97b677 100644 --- a/renderdoc/driver/d3d12/d3d12_rendertexture.cpp +++ b/renderdoc/driver/d3d12/d3d12_rendertexture.cpp @@ -476,7 +476,9 @@ bool D3D12Replay::RenderTextureInternal(D3D12_CPU_DESCRIPTOR_HANDLE rtv, Texture else if(IsIntFormat(resourceDesc.Format)) pixelData.OutputDisplayFormat |= TEXDISPLAY_SINT_TEX; - if(!IsSRGBFormat(resourceDesc.Format) && cfg.linearDisplayAsGamma) + // Check both the resource format and view format for sRGB + if(!IsSRGBFormat(resourceDesc.Format) && cfg.typeCast != CompType::UNormSRGB && + cfg.linearDisplayAsGamma) pixelData.OutputDisplayFormat |= TEXDISPLAY_GAMMA_CURVE; Vec4u YUVDownsampleRate = {}, YUVAChannels = {};