From 97dd480b21abc17b08c5d37d872d54a7650be21a Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Thu, 8 Oct 2026 06:23:22 +0200 Subject: [PATCH] Fix shader: remove leftover window.__flightDir references Old shader code with fdx/fdz still referenced window.__flightDir, which GLSL can't parse. Removed those lines. Now shader uses only uFlightDir uniform passed from JS. --- vendor/clouds3d.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index 1bf4926..23899a9 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -140,10 +140,7 @@ var FRAG_SRC = [ 'float drift = uTime * uSpeed * 0.12;', // Fixed altitude well above the cloud ceiling (y=1.5). 'float camY = 2.2;', - // Camera position follows window.__flightDir (set from URL #flight=...). - // Default: drift along +Z (north). For east: drift along +X. For south: -Z, etc. - 'float fdx = (window.__flightDir ? window.__flightDir.dx : 0.0);', - 'float fdz = (window.__flightDir ? window.__flightDir.dz : 1.0);', + // Camera position uses uFlightDir uniform (set from JS each frame). 'vec3 ro = vec3(drift * uFlightDir.x, camY, drift * uFlightDir.y);', // Ray direction: tilt more downward so the visible ground fits // within the mosaic. At uv.y = 0 the ray goes ~26° below