From ee0267d741ad3d341b1da16574da220d3fa63663 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 19 Nov 2020 14:34:32 +0000 Subject: [PATCH] Fix missing sRGB conversion of clear background color --- renderdoc/replay/replay_output.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/renderdoc/replay/replay_output.cpp b/renderdoc/replay/replay_output.cpp index b964d2fd1..6c98113c9 100644 --- a/renderdoc/replay/replay_output.cpp +++ b/renderdoc/replay/replay_output.cpp @@ -490,14 +490,12 @@ void ReplayOutput::ClearBackground(uint64_t outputID, const FloatVector &backgro { CHECK_REPLAY_THREAD(); - if(m_RenderData.texDisplay.backgroundColor.x == 0.0f && - m_RenderData.texDisplay.backgroundColor.y == 0.0f && - m_RenderData.texDisplay.backgroundColor.z == 0.0f && - m_RenderData.texDisplay.backgroundColor.w == 0.0f) + if(backgroundColor.x == 0.0f && backgroundColor.y == 0.0f && backgroundColor.z == 0.0f && + backgroundColor.w == 0.0f) m_pDevice->RenderCheckerboard(RenderDoc::Inst().DarkCheckerboardColor(), RenderDoc::Inst().LightCheckerboardColor()); else - m_pDevice->ClearOutputWindowColor(outputID, m_RenderData.texDisplay.backgroundColor); + m_pDevice->ClearOutputWindowColor(outputID, ConvertSRGBToLinear(backgroundColor)); } void ReplayOutput::DisplayContext()