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) <noreply@anthropic.com>
This commit is contained in:
pletch
2026-09-08 01:55:54 -04:00
parent 8988165159
commit bdea2ff1b8
+4 -4
View File
@@ -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);',
'}'