Mapgen4 rendering reference
https://github.com/redblobgames/mapgen4
https://www.redblobgames.com/maps/mapgen4/

Copyright 2017, 2018, 2025 Red Blob Games <redblobgames@gmail.com>
Licensed under the Apache License, Version 2.0 (see Mapgen4-LICENSE.txt).

Pinned upstream commit: c1d8cb018a11a8b9e17d59233c36c176429d37eb

The Unity implementation directly ports the original elevation pipeline,
dual-mesh geometry and river geometry to C#, and the five render.ts GPU passes
to HLSL: river, land elevation, depth, drape and final sampling. The author's
original Poisson-disc points and dual mesh are preserved in mesh-5.5.bytes.

Game-specific adapters supply continuous WorldData height constraints and
existing river paths without modifying simulation or saved arrays. Normal
gameplay now uses upstream rainfall and the original elevation/moisture color
lookup; country borders and selection are a separate transparent overlay.
The world viewport is rendered directly to a screen-aspect GPU target and
reprojected on zoom/pan. A non-visual GPU picking pass uses the same surface.
An authored-color legacy export option remains for earlier regression tools.

The separate Original Mapgen4 Preview additionally uses the original painting.ts
FBM generator, map.ts wind/rainfall and river erosion pipeline, and the original
elevation/rainfall color lookup without the game-specific color replacement.
Its 2048-square GPU canvas reprojects for zoom and pan. It does not load or
replace the user's simulation world or saved data.

Implementation: Mapgen4Geometry.cs, Mapgen4Noise.cs, Mapgen4GpuRenderer.cs,
Resources/Mapgen4Terrain.shader, and the MapVisualRenderer.cs data adapter.
The earlier regular-grid CPU relief approximation has been removed.
See reference/Mapgen4/UNITY_PORT.md and Mapgen4-Dependencies.txt for provenance.
