islaApocalypse-v2/Tools/Scripts
beezm 89e0f85c9f chat2/12: drainage analysis (minimal-first) — the reference river plan ported, analysis only, on the eroded terrain
Core/Scripts/DrainageAnalysis.cs is the reference's DrainageAnalysis ported verbatim: the
Barnes priority-flood routing fill (8-connected, seeded from the four borders, index
tiebreak, pit fills ONE ULP above the parent so every filled cell keeps a strictly
descending path to its spill; the terrain heightmap itself is never written - the fill lives
in its own array), terminal-basin qualification (depth >= 2 m AND area >= 10,000 px; the rest
are pits filled through), D8 flow directions on the routing surface - FOR ANALYSIS ONLY, the
reverted-as-carving landmine stated in the file - Kahn accumulation, the memoised destination
walk crediting a terminal basin with TOTAL inflow, sea-reaching outlets ranked by drainage
area with the outlet separation, main stems by max accumulation, mountain exits from the
along-stem grade, lean tributaries, lean endorheic terminals, and the promoted giants
(provisional routes computed as the reference did, not drawn - routing is a later task).
WorldScale-denominated; Dir / Acc / Filled / FullFilled / BasinId / BasinInflow exposed so the
caller can prove the invariants.

"The sea" is the OCEAN body from the region layer: RegionLabeling.OceanMask - the 4-connected
water component touching the border, on the CLASSIFY field (the water-side complement of the
land contract). Enclosed lagoons, lake beds and island-fringe pockets are ordinary terrain to
the router.

DrainageTool (4 task-11 seeds at 8192, the eroded fields bit-identical to the 11 dumps)
renders the log-scaled accumulation map and the promoted-candidates overlay (trunks cyan,
endorheic giants orange, lean terminals red; nothing carved) and writes the accumulation
.f32. Oracle, all passing: render AND classify fields bit-identical before/after the analysis
(zero terrain cells written), no water added, full fill >= original everywhere with a
non-ascending path to the border from every cell, ocean mask all below sea and on the border,
dir/acc/candidates identical across two runs.

Endorheic basins are the expected first-class output: on every seed the top giants out-drain
the top trunks - the biggest drainages pool inland because erosion delivers the upland network
only and cannot cross the flats.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013EY3ZTF6NwzF8ukBHQXSK7
2026-08-22 20:51:51 -04:00
..
CoastalFragment.cs chat2/09: coastal fragmentation — a perimeter-wide, band-limited noise, amplitude laddered at a fixed stretch 2026-08-22 07:09:27 -04:00
CoastalFragment.cs.uid chat2/09: coastal fragmentation — a perimeter-wide, band-limited noise, amplitude laddered at a fixed stretch 2026-08-22 07:09:27 -04:00
CoastalFragmentTool.cs chat2/09: coastal fragmentation — a perimeter-wide, band-limited noise, amplitude laddered at a fixed stretch 2026-08-22 07:09:27 -04:00
CoastalFragmentTool.cs.uid chat2/09: coastal fragmentation — a perimeter-wide, band-limited noise, amplitude laddered at a fixed stretch 2026-08-22 07:09:27 -04:00
CurveBaselineTool.cs Phase 2a: continuous grade — smooth the upper staircase, preserve the lowlands 2026-08-20 03:41:27 -04:00
CurveBaselineTool.cs.uid Phase 2a: the faithful redistribution curve, re-measured against v2's own output 2026-08-20 01:38:10 -04:00
CurveContinuousTool.cs Phase 2a: continuous grade — smooth the upper staircase, preserve the lowlands 2026-08-20 03:41:27 -04:00
CurveContinuousTool.cs.uid Phase 2a: continuous grade — smooth the upper staircase, preserve the lowlands 2026-08-20 03:41:27 -04:00
DrainageRenderer.cs chat2/12: drainage analysis (minimal-first) — the reference river plan ported, analysis only, on the eroded terrain 2026-08-22 20:51:51 -04:00
DrainageRenderer.cs.uid chat2/12: drainage analysis (minimal-first) — the reference river plan ported, analysis only, on the eroded terrain 2026-08-22 20:51:51 -04:00
DrainageTool.cs chat2/12: drainage analysis (minimal-first) — the reference river plan ported, analysis only, on the eroded terrain 2026-08-22 20:51:51 -04:00
DrainageTool.cs.uid chat2/12: drainage analysis (minimal-first) — the reference river plan ported, analysis only, on the eroded terrain 2026-08-22 20:51:51 -04:00
ErosionPass.cs chat2/11: hydraulic erosion — the faithful droplet pass on the locked shape, render-only, judged off vs on 2026-08-22 12:19:20 -04:00
ErosionPass.cs.uid chat2/11: hydraulic erosion — the faithful droplet pass on the locked shape, render-only, judged off vs on 2026-08-22 12:19:20 -04:00
ErosionTool.cs chat2/11: hydraulic erosion — the faithful droplet pass on the locked shape, render-only, judged off vs on 2026-08-22 12:19:20 -04:00
ErosionTool.cs.uid chat2/11: hydraulic erosion — the faithful droplet pass on the locked shape, render-only, judged off vs on 2026-08-22 12:19:20 -04:00
FragGalleryTool.cs chat2/10: frag_4 seed gallery — render-only, the 09 setting frozen across 2 anchors + 6 fresh seeds at 8192 2026-08-22 10:24:56 -04:00
FragGalleryTool.cs.uid chat2/10: frag_4 seed gallery — render-only, the 09 setting frozen across 2 anchors + 6 fresh seeds at 8192 2026-08-22 10:24:56 -04:00
GrayscaleRenderer.cs Phase 1 review: raw grayscale, the wide gradient as hero, fixed batch naming 2026-08-19 22:55:53 -04:00
GrayscaleRenderer.cs.uid Phase 1 review: raw grayscale, the wide gradient as hero, fixed batch naming 2026-08-19 22:55:53 -04:00
HeightField.cs Phase 1: shaded relief and the Hispaniola palette — the grin gate 2026-08-19 21:58:44 -04:00
HeightField.cs.uid Phase 1: shaded relief and the Hispaniola palette — the grin gate 2026-08-19 21:58:44 -04:00
Hillshade.cs Phase 1: shaded relief and the Hispaniola palette — the grin gate 2026-08-19 21:58:44 -04:00
Hillshade.cs.uid Phase 1: shaded relief and the Hispaniola palette — the grin gate 2026-08-19 21:58:44 -04:00
HistogramRenderer.cs Phase 2a: the faithful redistribution curve, re-measured against v2's own output 2026-08-20 01:38:10 -04:00
HistogramRenderer.cs.uid Phase 2a: the faithful redistribution curve, re-measured against v2's own output 2026-08-20 01:38:10 -04:00
IslandFalloff.cs chat2/06: offshore islands — revert the forced floor, tune the organic layer for coverage 2026-08-21 06:22:54 -04:00
IslandFalloff.cs.uid Phase 1: port the crown-jewel noise and pass-1, and render the island 2026-08-19 21:27:20 -04:00
LandHistogram.cs Phase 2a: restore the mountain — calibrate the climb to the staircase, not to a guess 2026-08-20 04:14:47 -04:00
LandHistogram.cs.uid Phase 2a: the faithful redistribution curve, re-measured against v2's own output 2026-08-20 01:38:10 -04:00
LegendRenderer.cs Phase 1 review: raw grayscale, the wide gradient as hero, fixed batch naming 2026-08-19 22:55:53 -04:00
LegendRenderer.cs.uid Phase 1 review: raw grayscale, the wide gradient as hero, fixed batch naming 2026-08-19 22:55:53 -04:00
LookConfig.cs Phase 1 review: raw grayscale, the wide gradient as hero, fixed batch naming 2026-08-19 22:55:53 -04:00
LookConfig.cs.uid Phase 1: shaded relief and the Hispaniola palette — the grin gate 2026-08-19 21:58:44 -04:00
MountainRestoreTool.cs Phase 2a: restore the mountain — calibrate the climb to the staircase, not to a guess 2026-08-20 04:14:47 -04:00
MountainRestoreTool.cs.uid Phase 2a: restore the mountain — calibrate the climb to the staircase, not to a guess 2026-08-20 04:14:47 -04:00
NoiseDefaultsProbe.cs Phase 1: port the crown-jewel noise and pass-1, and render the island 2026-08-19 21:27:20 -04:00
NoiseDefaultsProbe.cs.uid Phase 1: port the crown-jewel noise and pass-1, and render the island 2026-08-19 21:27:20 -04:00
OffshoreAnalysis.cs chat2/07: the region-labeling layer — label all land, tag by construction, tunable speck revert 2026-08-22 03:50:33 -04:00
OffshoreAnalysis.cs.uid chat2/05: offshore islands — rejoin the stub faithfully, then reshape to a guaranteed hybrid 2026-08-21 05:14:53 -04:00
OffshoreDiagnosis.cs chat2/06: offshore islands — revert the forced floor, tune the organic layer for coverage 2026-08-21 06:22:54 -04:00
OffshoreDiagnosis.cs.uid chat2/06: offshore islands — revert the forced floor, tune the organic layer for coverage 2026-08-21 06:22:54 -04:00
OffshoreIslandsTool.cs chat2/07: the region-labeling layer — label all land, tag by construction, tunable speck revert 2026-08-22 03:50:33 -04:00
OffshoreIslandsTool.cs.uid chat2/05: offshore islands — rejoin the stub faithfully, then reshape to a guaranteed hybrid 2026-08-21 05:14:53 -04:00
OffshorePass.cs chat2/06: offshore islands — revert the forced floor, tune the organic layer for coverage 2026-08-21 06:22:54 -04:00
OffshorePass.cs.uid chat2/05: offshore islands — rejoin the stub faithfully, then reshape to a guaranteed hybrid 2026-08-21 05:14:53 -04:00
OffshoreSettings.cs chat2/06: offshore islands — revert the forced floor, tune the organic layer for coverage 2026-08-21 06:22:54 -04:00
OffshoreSettings.cs.uid chat2/05: offshore islands — rejoin the stub faithfully, then reshape to a guaranteed hybrid 2026-08-21 05:14:53 -04:00
Pass1Result.cs chat2/07: the region-labeling layer — label all land, tag by construction, tunable speck revert 2026-08-22 03:50:33 -04:00
Pass1Result.cs.uid Phase 1: port the crown-jewel noise and pass-1, and render the island 2026-08-19 21:27:20 -04:00
Pass2Result.cs chat2/11: hydraulic erosion — the faithful droplet pass on the locked shape, render-only, judged off vs on 2026-08-22 12:19:20 -04:00
Pass2Result.cs.uid Phase 2a: the faithful redistribution curve, re-measured against v2's own output 2026-08-20 01:38:10 -04:00
RegionLabelingTool.cs chat2/07: the region-labeling layer — label all land, tag by construction, tunable speck revert 2026-08-22 03:50:33 -04:00
RegionLabelingTool.cs.uid chat2/07: the region-labeling layer — label all land, tag by construction, tunable speck revert 2026-08-22 03:50:33 -04:00
RegionOverlayRenderer.cs chat2/07: the region-labeling layer — label all land, tag by construction, tunable speck revert 2026-08-22 03:50:33 -04:00
RegionOverlayRenderer.cs.uid chat2/07: the region-labeling layer — label all land, tag by construction, tunable speck revert 2026-08-22 03:50:33 -04:00
RegionPass.cs chat2/07: the region-labeling layer — label all land, tag by construction, tunable speck revert 2026-08-22 03:50:33 -04:00
RegionPass.cs.uid chat2/07: the region-labeling layer — label all land, tag by construction, tunable speck revert 2026-08-22 03:50:33 -04:00
ReliefPalette.cs Phase 2a: continuous grade — smooth the upper staircase, preserve the lowlands 2026-08-20 03:41:27 -04:00
ReliefPalette.cs.uid Phase 1: shaded relief and the Hispaniola palette — the grin gate 2026-08-19 21:58:44 -04:00
ReliefRenderer.cs Phase 1 review: raw grayscale, the wide gradient as hero, fixed batch naming 2026-08-19 22:55:53 -04:00
ReliefRenderer.cs.uid Phase 1: shaded relief and the Hispaniola palette — the grin gate 2026-08-19 21:58:44 -04:00
ReliefRenderTool.cs Fix the ISLA_SOURCE default the batch rename broke 2026-08-19 23:38:10 -04:00
ReliefRenderTool.cs.uid Phase 1: shaded relief and the Hispaniola palette — the grin gate 2026-08-19 21:58:44 -04:00
ReviewBatchTool.cs Fix the ISLA_SOURCE default the batch rename broke 2026-08-19 23:38:10 -04:00
ReviewBatchTool.cs.uid Phase 1 review: raw grayscale, the wide gradient as hero, fixed batch naming 2026-08-19 22:55:53 -04:00
SeedGalleryTool.cs chat2/04: the seed gallery — render-only, plus the terrain-curve-v1 checkpoint 2026-08-21 00:20:42 -04:00
SeedGalleryTool.cs.uid chat2/04: the seed gallery — render-only, plus the terrain-curve-v1 checkpoint 2026-08-21 00:20:42 -04:00
ShadeRenderer.cs chat2/11: hydraulic erosion — the faithful droplet pass on the locked shape, render-only, judged off vs on 2026-08-22 12:19:20 -04:00
ShadeRenderer.cs.uid chat2/12: drainage analysis (minimal-first) — the reference river plan ported, analysis only, on the eroded terrain 2026-08-22 20:51:51 -04:00
Shaping.cs chat2/07: the region-labeling layer — label all land, tag by construction, tunable speck revert 2026-08-22 03:50:33 -04:00
Shaping.cs.uid Phase 2a: the faithful redistribution curve, re-measured against v2's own output 2026-08-20 01:38:10 -04:00
ShapingOracle.cs chat2/09: coastal fragmentation — a perimeter-wide, band-limited noise, amplitude laddered at a fixed stretch 2026-08-22 07:09:27 -04:00
ShapingOracle.cs.uid Phase 2a: the faithful redistribution curve, re-measured against v2's own output 2026-08-20 01:38:10 -04:00
SouthernStretch.cs chat2/08: southern stretch, EXPLORATION — the fragmentation knob space, diagnosed then laddered 2026-08-22 05:54:12 -04:00
SouthernStretch.cs.uid chat2/08: southern stretch, EXPLORATION — the fragmentation knob space, diagnosed then laddered 2026-08-22 05:54:12 -04:00
SouthernStretchTool.cs chat2/08: southern stretch, EXPLORATION — the fragmentation knob space, diagnosed then laddered 2026-08-22 05:54:12 -04:00
SouthernStretchTool.cs.uid chat2/08: southern stretch, EXPLORATION — the fragmentation knob space, diagnosed then laddered 2026-08-22 05:54:12 -04:00
TagOverlayRenderer.cs chat2/06: offshore islands — revert the forced floor, tune the organic layer for coverage 2026-08-21 06:22:54 -04:00
TagOverlayRenderer.cs.uid chat2/05: offshore islands — rejoin the stub faithfully, then reshape to a guaranteed hybrid 2026-08-21 05:14:53 -04:00
TerrainGenConfig.cs chat2/11: hydraulic erosion — the faithful droplet pass on the locked shape, render-only, judged off vs on 2026-08-22 12:19:20 -04:00
TerrainGenConfig.cs.uid Phase 1: port the crown-jewel noise and pass-1, and render the island 2026-08-19 21:27:20 -04:00
TerrainGenTool.cs Phase 1 review: raw grayscale, the wide gradient as hero, fixed batch naming 2026-08-19 22:55:53 -04:00
TerrainGenTool.cs.uid Phase 1: port the crown-jewel noise and pass-1, and render the island 2026-08-19 21:27:20 -04:00
TerrainNoise.cs Phase 2a: the faithful redistribution curve, re-measured against v2's own output 2026-08-20 01:38:10 -04:00
TerrainNoise.cs.uid Phase 1: port the crown-jewel noise and pass-1, and render the island 2026-08-19 21:27:20 -04:00
TinyFont.cs Phase 1 review: raw grayscale, the wide gradient as hero, fixed batch naming 2026-08-19 22:55:53 -04:00
TinyFont.cs.uid Phase 1 review: raw grayscale, the wide gradient as hero, fixed batch naming 2026-08-19 22:55:53 -04:00
Topography.cs chat2/09: coastal fragmentation — a perimeter-wide, band-limited noise, amplitude laddered at a fixed stretch 2026-08-22 07:09:27 -04:00
Topography.cs.uid Phase 1: port the crown-jewel noise and pass-1, and render the island 2026-08-19 21:27:20 -04:00
UserDirProbe.cs Phase 0: clean project skeleton for the v2 rewrite 2026-08-19 20:21:12 -04:00
UserDirProbe.cs.uid Phase 0: clean project skeleton for the v2 rewrite 2026-08-19 20:21:12 -04:00