A5: World art for points of interest, build pieces, vessels and terrain

- PoiMesher dresses every point of interest from its parts: lapped tarred
  weatherboards, plank boards, stone in a running bond with lichen, tiled
  roofs with a ridge cap, salt-white trim on paint, crusted salt pans, and a
  tarred frame round the lighthouse's glowing glass. One mesh per POI.
- Huts get a shuttered window in each side wall (non-solid parts, no rng).
- Build pieces show their state: building in quarter steps, worn (a third of
  health gone) and battered (two thirds gone, strips knocked out).
  StructureView rebuilds a piece's mesh only when its state changes.
- VesselModels builds the barge (lofted hull, curved rails, mooring lines,
  gored envelope) and the sea chests in code; the primitive stand-ins are gone.
- Terrain: tussocks, wind-dried patches, shingle on sand, lichen on rock.
- test_world_art (9) fails on any primitive stand-in mesh or placeholder
  resource under src/ or assets/, and covers POI bounds and determinism,
  windows, the lamp surface, wear and build stages, view rebuilds and the
  vessel models.
- make poi-captures and make build-captures (state card, vessels).

Closes #45

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-13 20:39:24 -05:00
co-authored by Claude Opus 5.5
parent fdd4c992c3
commit 923876ed1f
22 changed files with 976 additions and 131 deletions
+13
View File
@@ -52,13 +52,26 @@ void fragment() {
float broad = fbm(p * 0.035);
float fine = fbm(p * 0.6);
float clumps = fbm(p * 0.16 + vec2(17.0, 3.0));
float grain = value_noise(p * 3.1);
// Detail fades with distance so it doesn't shimmer far off.
float near = 1.0 - smoothstep(40.0, 160.0, length(world_position - CAMERA_POSITION_WORLD));
float ripple = 0.5 + 0.5 * sin(dot(p, vec2(0.55, 0.32)) + broad * 9.0);
vec3 sand = sand_colour * (0.9 + 0.12 * fine) * (0.97 + 0.04 * ripple);
// Shingle: dark pebbles scattered on the sand.
sand = mix(sand, rock_colour * 0.75, near * 0.6 * step(0.86, grain) * step(0.45, clumps));
vec3 marsh = mix(marsh_colour * 0.75, marsh_colour * 1.1, smoothstep(0.35, 0.65, broad + 0.2 * fine));
vec3 grass = grass_colour * (0.78 + 0.35 * broad) * (0.9 + 0.15 * fine);
grass = mix(grass, grass * vec3(1.15, 1.05, 0.7), smoothstep(0.55, 0.75, broad));
// Tussocks: darker clumps of rough grass, and paler wind-dried patches between them.
grass *= mix(1.0, 0.8, smoothstep(0.5, 0.68, clumps));
grass = mix(grass, grass * vec3(1.12, 1.08, 0.82), 0.6 * smoothstep(0.3, 0.18, clumps));
grass *= 1.0 - near * 0.12 * smoothstep(0.55, 0.9, grain);
float strata = 0.5 + 0.5 * sin(world_position.y * 2.1 + broad * 5.0);
vec3 rock = rock_colour * (0.82 + 0.22 * fine + 0.1 * strata);
// Lichen crusts in blotches.
rock = mix(rock, vec3(0.62, 0.61, 0.45) * (0.9 + 0.2 * fine), 0.45 * smoothstep(0.6, 0.72, clumps));
vec3 summit = summit_colour * (0.88 + 0.14 * fine);
rock = mix(rock, summit, 0.8 * smoothstep(summit_height - 2.0, summit_height + 6.0, world_position.y + 3.0 * broad));