From 2fa4c59523c474730fe926f4a1b156920c0a0ed6 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 12 Feb 2019 18:42:28 -0500 Subject: [PATCH] Correction: use the QAM texture for colours. --- Outputs/OpenGL/ScanTargetGLSLFragments.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp index 4f058b94c..857325bea 100644 --- a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp +++ b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp @@ -421,15 +421,12 @@ std::unique_ptr ScanTarget::conversion_shader() const { // Split and average chrominance. "vec2 chrominances[4] = vec2[4](" - "textureLod(textureName, qamTextureCoordinates[0], 0).gb," - "textureLod(textureName, qamTextureCoordinates[1], 0).gb," - "textureLod(textureName, qamTextureCoordinates[2], 0).gb," - "textureLod(textureName, qamTextureCoordinates[3], 0).gb" - ");" - "vec2 channels = vec2(" - "dot(vec4(chrominances[0].x, chrominances[1].x, chrominances[2].x, chrominances[3].x), vec4(0.25))*2.0 - 1.0," - "dot(vec4(chrominances[0].y, chrominances[1].y, chrominances[2].y, chrominances[3].y), vec4(0.25))*2.0 - 1.0" + "textureLod(qamTextureName, qamTextureCoordinates[0], 0).gb," + "textureLod(qamTextureName, qamTextureCoordinates[1], 0).gb," + "textureLod(qamTextureName, qamTextureCoordinates[2], 0).gb," + "textureLod(qamTextureName, qamTextureCoordinates[3], 0).gb" ");" + "vec2 channels = (chrominances[0] + chrominances[1] + chrominances[2] + chrominances[3])*0.5 - vec2(1.0);" // Apply a colour space conversion to get RGB. "fragColour3 = mix("