From bdea2ff1b85f39a3f212ada3cbec38692d4e599d Mon Sep 17 00:00:00 2001 From: pletch <17855860+pletch@users.noreply.github.com> Date: Tue, 8 Sep 2026 01:55:54 -0400 Subject: [PATCH] fix(h264): do not shadow the pixel row in the chroma shader The colour-space change introduced "float y" for the scaled luma, but y is already the int pixel row in that scope. GLSL rejected the redefinition and then every arithmetic line that mixed the two, so the shader failed to compile and the renderer fell back to 4:2:0 for the whole session: ERROR: 0:89: 'y' : redefinition ERROR: 0:93: '+' : no operation exists that takes highp int and highp float Name it luma. Co-Authored-By: Claude Opus 5 (1M context) --- static/guac/Yuv444.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/guac/Yuv444.js b/static/guac/Yuv444.js index be4cc0d..7550e51 100644 --- a/static/guac/Yuv444.js +++ b/static/guac/Yuv444.js @@ -345,14 +345,14 @@ Guacamole.Yuv444Renderer = function Yuv444Renderer() { * renders visibly flatter than the 4:2:0 one beside it -- the same * session, two different colours, depending only on which codec the * server happened to choose. setColorSpace() supplies these. */ - ' float y = (Y - uRange.x) * uRange.y;', + ' float luma = (Y - uRange.x) * uRange.y;', ' float u = (U - 0.50196078) * uCScale;', /* 128/255 */ ' float v = (V - 0.50196078) * uCScale;', ' vec3 rgb = vec3(', - ' y + uCoef.x * v,', - ' y - uCoef.y * u - uCoef.z * v,', - ' y + uCoef.w * u);', + ' luma + uCoef.x * v,', + ' luma - uCoef.y * u - uCoef.z * v,', + ' luma + uCoef.w * u);', ' fragColor = vec4(clamp(rgb, 0.0, 1.0), 1.0);', '}'