From 52c8cd7e852ff207dd6b6acf875dc53a4677e9c7 Mon Sep 17 00:00:00 2001 From: Jeremy Selan Date: Wed, 10 Jan 2024 14:46:08 -0800 Subject: [PATCH] [color_helpers]: do not do color remapping for PQ source content Fixes a bug where HDR colors were not being rendered faithfully at the edges of the color gamut. Thanks to JDSP for reporting. --- src/color_helpers.cpp | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/color_helpers.cpp b/src/color_helpers.cpp index 7a6e046f30..4ec148a655 100644 --- a/src/color_helpers.cpp +++ b/src/color_helpers.cpp @@ -866,24 +866,12 @@ void buildPQColorimetry( displaycolorimetry_t * pColorimetry, colormapping_t *pM { *pColorimetry = displaycolorimetry_2020; - if ( BIsWideGamut( nativeDisplayOutput) ) - { - colormapping_t smoothRemap; - smoothRemap.blendEnableMinSat = 0.7f; - smoothRemap.blendEnableMaxSat = 1.0f; - smoothRemap.blendAmountMin = 0.0f; - smoothRemap.blendAmountMax = 1.f; - *pMapping = smoothRemap; - } - else - { - colormapping_t noRemap; - noRemap.blendEnableMinSat = 0.7f; - noRemap.blendEnableMaxSat = 1.0f; - noRemap.blendAmountMin = 0.0f; - noRemap.blendAmountMax = 0.0f; - *pMapping = noRemap; - } + colormapping_t noRemap; + noRemap.blendEnableMinSat = 0.0f; + noRemap.blendEnableMaxSat = 1.0f; + noRemap.blendAmountMin = 0.0f; + noRemap.blendAmountMax = 0.0f; + *pMapping = noRemap; } bool approxEqual( const glm::vec3 & a, const glm::vec3 & b, float flTolerance = 1e-5f )