mirror of
https://github.com/sol1/rustguac.git
synced 2026-10-24 20:52:24 +00:00
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:
@@ -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);',
|
||||
'}'
|
||||
|
||||
Reference in New Issue
Block a user