From 425dbf45290434de8be163ca735ba4851362347c Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Wed, 7 Oct 2026 21:11:04 +0200 Subject: [PATCH] Slow down flight + extend corridor for longer tile residency Camera speed was 0.45 units/sec which on 13km/tile tiles = ~5850 km/h = supersonic. User reported flying through tiles too fast. - drift speed 0.45 -> 0.12 units/sec (~1500 km/h, fast plane) - corridor 15 -> 25 tiles along travel (~3.5 min between refetches at uSpeed=1, instead of ~12 sec) - buffer 2 -> 3 tiles (refetch starts earlier so we always have tiles loaded before the camera reaches the edge) - Updated JS-side drift calculation to match the new shader speed Camera now leisurely follows the corridor; refetch only once every couple of minutes. --- vendor/clouds3d.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index 6d02357..93aca8c 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -136,7 +136,7 @@ var FRAG_SRC = [ // Camera path: slow drift in X, cruising just above the cloud deck // like an airliner cockpit. No dives — we stay above so the // deck is always visible below us. - 'float drift = uTime * uSpeed * 0.45;', + 'float drift = uTime * uSpeed * 0.12;', // Fixed altitude well above the cloud ceiling (y=1.5). 'float camY = 2.2;', 'vec3 ro = vec3(0.0, camY, drift);', @@ -275,9 +275,9 @@ var GROUND_TILE_SIZE = 256; // The corridor is aligned with both motion and look direction. var GROUND_TRAVEL_COS = 0.0; // cos(90 deg) var GROUND_TRAVEL_SIN = 1.0; // sin(90 deg) -var GROUND_CORRIDOR_LONG = 15; // tiles along the travel direction +var GROUND_CORRIDOR_LONG = 25; // tiles along travel direction (~3.5 min of flight at uSpeed=1) var GROUND_CORRIDOR_PERP = 5; // tiles perpendicular to travel -var GROUND_BUFFER_LONG = 2; // refetch when this close to forward edge +var GROUND_BUFFER_LONG = 3; // refetch when this close to forward edge var GROUND_BUFFER_PERP = 1; // refetch when this close to side edge // Passau tile at zoom 11 var GROUND_BASE_X = 1099; @@ -522,7 +522,7 @@ window.clouds3dRender = function(target) { gl.uniform2f(s.uGroundCenter, centerWorld.x, centerWorld.y); gl.uniform2f(s.uGroundSize, GROUND_CORRIDOR_LONG, GROUND_CORRIDOR_PERP); - var drift = now * speed * 0.45; + var drift = now * speed * 0.12; if (performance.now() - groundLastCheck > 1500) { groundLastCheck = performance.now(); maybeRefetchGround(drift, drift * 0.7, gl);