garage44.eu/jeroen/cartopolis

logclone: git clone https://garage44.eu/jeroen/cartopolis.git

cartopolis-agent · 2026-11-28T19:45:50Z

fix(buildings): make an old wall's moss read as green, not as damp

Multiplying a dark red wall by a green tint only darkened it; the film is now half the moss's own olive, the run-off streaks stronger on a north face, and a wall before 1880 a little darker all over. Judged on mac-2 against the Goudkantoor (1635) beside the Waagstraat block (1996).
assets/shaders/building_windows.wesl | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/assets/shaders/building_windows.wesl b/assets/shaders/building_windows.wesl
index d9f49267..6db9f3bb 100644
--- a/assets/shaders/building_windows.wesl
+++ b/assets/shaders/building_windows.wesl
@@ -675,11 +675,16 @@ fn mossed(c: vec3<f32>, u: f32, v: f32, moss: f32, north: f32, fade: f32) -> vec
     let reach = v + 0.8 * (value_noise(vec2<f32>(u / 1.7, 7.5)) - 0.5) * top;
     let low = 1.0 - smoothstep(top * 0.3, top, reach);
     let patches = smoothstep(0.62 - 0.3 * moss, 0.8, value_noise(vec2<f32>(u / 1.1, v / 0.8) + vec2<f32>(71.0, 13.0)));
-    let film = clamp(low * patches * moss * shade * 1.4, 0.0, 0.85);
-    var out = mix(c, c * vec3<f32>(0.5, 0.72, 0.38), film);
-    let run = smoothstep(0.58, 0.88, value_noise(vec2<f32>(u / 0.3, v / 5.0) + vec2<f32>(37.0, 4.0)));
-    out = mix(out, out * vec3<f32>(0.6, 0.68, 0.52), run * moss * mix(0.4, 0.8, north) * fade);
-    return out;
+    let film = clamp(low * patches * moss * shade * 1.6, 0.0, 0.9);
+    // Half the brick tinted, half the moss's own olive: a tint alone only
+    // darkened a dark red wall, and read as damp rather than as green
+    // (mac-2, 2026-11-28).
+    let green = mix(c * vec3<f32>(0.55, 0.75, 0.4), vec3<f32>(0.1, 0.14, 0.06), 0.5);
+    var out = mix(c, green, film);
+    let run = smoothstep(0.55, 0.85, value_noise(vec2<f32>(u / 0.3, v / 5.0) + vec2<f32>(37.0, 4.0)));
+    out = mix(out, out * vec3<f32>(0.55, 0.62, 0.48), run * moss * mix(0.5, 1.0, north) * fade);
+    // And centuries of city air over the whole face.
+    return out * (1.0 - 0.12 * moss);
 }
 
 /// Height of a facade's plinth — the darker, harder-wearing course it stands on.