feat(editor): add --gen-texture-mold Worley-noise patches

72nd procedural texture: Worley (cellular) noise thresholded
into mold patches. Each grid cell hosts a hash-jittered
center; each pixel computes its distance to the nearest
center across 9 surrounding cells (current + 8 neighbors)
and is painted as mold if that distance is below
thresholdFrac × stride.

Distinct from --gen-texture-moss (single-spot per cell with
hash-derived presence/jitter/radius) — mold has irregular
field-shaped patches following the Voronoi cell boundaries
rather than discrete circles, mimicking real fungal growth
along surfaces.

Useful for cellars, dungeon walls, plague zones, sewer
overflow, food-warehouse spoilage, witch-hut detail trim.
Default 18-stride / 0.55-threshold gives a moderate
infestation; bump threshold near 0.9 for full coverage.
This commit is contained in:
Kelsi 2026-05-09 13:19:30 -07:00
parent e95e983988
commit 805f7ce240
3 changed files with 90 additions and 1 deletions

View file

@ -177,6 +177,8 @@ void printUsage(const char* argv0) {
std::printf(" Swirl: N-arm logarithmic spiral (magic sigils / summoning circles / ritual floor markings)\n");
std::printf(" --gen-texture-ironbark <out.png> <baseHex> <crackHex> [streakSpacing] [plateY] [crackW] [seed] [W H]\n");
std::printf(" Ironbark: vertical wood streaks + horizontal plate bands (mature hardwood / sycamore / ironwood)\n");
std::printf(" --gen-texture-mold <out.png> <bgHex> <moldHex> [stride] [thresholdFrac] [seed] [W H]\n");
std::printf(" Mold: Worley-noise field patches (cellars / dungeon walls / sewer overflow / fungal growth)\n");
std::printf(" --add-texture-to-zone <zoneDir> <png-path> [renameTo]\n");
std::printf(" Copy an existing PNG into <zoneDir> (optionally renaming it on the way in)\n");
std::printf(" --gen-mesh <wom-base> <cube|plane|sphere|cylinder|torus|cone|ramp> [size]\n");