From 04e3400ab9a850a82731744336ebb3e9def73c31 Mon Sep 17 00:00:00 2001 From: Hermes Cron Job Date: Wed, 7 Oct 2026 13:31:23 +0000 Subject: [PATCH] fix(retro): CRT vertex shader failed to compile, rendering the 3D canvas black vec4(position, 0.0, 1.0) passes a vec3 plus two floats into a vec4 - five components into four. Invalid GLSL ES on both WebGL 1 and 2: THREE.WebGLProgram: Shader Error 0 - VALIDATE_STATUS false ERROR: 0:71: 'constructor' : too many arguments The whole post-processing pass failed and the game canvas read back as one colour, 0/64000 non-black pixels. position.xy is the vec2 the fullscreen quad needs. Verified headlessly with SwiftShader: 55-143 distinct colours, 63750/64000 lit pixels, no shader errors, scene hash changes after throttle + pitch. --- js/retro.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/retro.js b/js/retro.js index 3d0872b..96858c6 100644 --- a/js/retro.js +++ b/js/retro.js @@ -26,7 +26,7 @@ export class RetroEffect { varying vec2 vUv; void main() { vUv = uv; - gl_Position = vec4(position, 0.0, 1.0); + gl_Position = vec4(position.xy, 0.0, 1.0); } `, fragmentShader: `