From bfbb73a2af0cbae4ad0890d38fe647f7210dbf63 Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Wed, 7 Oct 2026 19:40:12 +0200 Subject: [PATCH] clouds2d: texture-based 4-octave fBm (fizzer-inspired) Rewrite clouds2d.js to sample a noise texture instead of computing fBm with hash functions. Each octave is one texture lookup with doubled UV scale and halved amplitude. - Same visual range as before but ~4x cheaper on ALU - REPEAT-wrapped texture tiles seamlessly when scrolled by time - Per-pixel hash21 jitter keeps the regular tiling from flickering - Exposes noise as a uniform, so multiple fragment shaders could share it - Theme-agnostic: pulls colours from __currentPalette Also adds #renderer=clouds2d URL-hash override for quick A/B testing between the volumetric clouds3d and the 2D version. --- background-final.html | 268 +++++++++++++++++++++++++----------------- background.html | 5 +- vendor/clouds2d.js | 236 ++++++++++++++++++++++--------------- 3 files changed, 300 insertions(+), 209 deletions(-) diff --git a/background-final.html b/background-final.html index 66635b1..9381925 100644 --- a/background-final.html +++ b/background-final.html @@ -1089,14 +1089,18 @@ else window.SunCalc = SunCalc;