From a6683cb9b87a2f427c2fa4ee06ce42edab60fd28 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 17 Jan 2019 20:52:33 -0500 Subject: [PATCH] Avoids scaling luminance prior to extracting chrominance. --- Outputs/OpenGL/ScanTargetGLSLFragments.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp index 9b1da7470..941397c6b 100644 --- a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp +++ b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp @@ -437,8 +437,9 @@ std::unique_ptr ScanTarget::conversion_shader(InputDataType input_data_t // Take the average to calculate luminance, then subtract that from all four samples to // give chrominance. - "float luminance = dot(samples, vec4(0.25 / (1.0 - compositeAmplitude)));" + "float luminance = dot(samples, vec4(0.25));" "samples -= vec4(luminance);" + "luminance /= (1.0 - compositeAmplitude);" // Split and average chrominance. "vec2 channels = vec2("