From 2e745c26ade76b733f0ac0cac6571a44168cde64 Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Wed, 7 Oct 2026 20:12:32 +0200 Subject: [PATCH] Soften night sky: 55% bright (was 85%), wider star band - skyDarkness 0.85 -> 0.55 so night sky is deep but not pitch black, leaving room for stars to show through - skyMask widened (-0.10 -> -0.20 lower bound, 0.30 -> 0.40 upper) so stars appear closer to the horizon in the cockpit view - Star tint multiplier 0.9 -> 1.0 (full bright) for clearer dots --- vendor/clouds3d.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index f4e73d4..5348fb2 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -148,10 +148,11 @@ var FRAG_SRC = [ // lower half of the sky so the airplane-cockpit view shows stars // from the horizon up. 'float nightFactor = smoothstep(0.05, -0.15, uSunAlt);', - 'float skyMask = smoothstep(-0.10, 0.30, rd.y);', + // Widened sky band so stars appear close to the horizon too. + 'float skyMask = smoothstep(-0.20, 0.40, rd.y);', 'float stars = starField(rd) * skyMask * nightFactor;', // (nightFactor is also used below for the final darken pass.)', - 'col = mix(col, uLight, clamp(stars, 0.0, 1.0) * 0.9);', + 'col = mix(col, uLight, clamp(stars, 0.0, 1.0));', // Density threshold: weather 'sunny' -> high (sparse clouds), // 'stormy' -> low (overcast deck). 'float baseThresh = mix(0.72, 0.40, uDensity);', @@ -189,7 +190,9 @@ var FRAG_SRC = [ // them goes dark. transmittance tells us how much light made it // through the cloud layer (1 = clear, 0 = fully cloudy). 'float cloud = 1.0 - trans;', - 'float skyDarkness = nightFactor * 0.85;', + // 0.55 — strong but not pitch black, leaves room for stars to + // remain visible against a deep but not void-black sky. + 'float skyDarkness = nightFactor * 0.55;', 'col = mix(col, col * (1.0 - skyDarkness), 1.0 - cloud);', 'gl_FragColor = vec4(col, 1.0);', '}'