Part of #776 — SOLID architecture debt umbrella.
Phase: P1 · Finding: M2
Problem
modules/worldgen-overworld/src/overworld_generator.zig (1,107 LOC) delegates terrain/biome to collaborators but inlines LOD color computation (biomeGrassTint/biomeFoliageTint/biomeWaterTint, 662-725), tree-hint computation (computeChunkTreeHints/choosePlacedTree/placeTreeOccupancy, 492-621), and material layering (makeMaterialLayers/surfaceTypeForBlock, 884-931).
Evidence
(Full evidence and file:line citations are in the umbrella #776.)
Fix
Extract two collaborators:
lod_coloring.zig (biomeGrassTint, biomeFoliageTint, biomeWaterTint)
tree_hints.zig (computeChunkTreeHints, choosePlacedTree, placeTreeOccupancy)
Material layering can stay or move to surface_builder.zig.
Verification
nix develop --command zig build test (includes shader validation)
- If rendering-touching: capture headless screenshot baseline before/after (
-Dskip-present)
- If behavior-preserving refactor: golden-output test must stay green
Constraints
- Small reviewable PR targeting
dev; conventional commit (refactor: / feat:)
- Preserve current behavior unless this issue explicitly changes it
- Keep worker-thread RHI isolation intact (no RHI calls off main thread)
Notes
v1 is otherwise well-decomposed (P6 strength) — this completes that decomposition.
Tracking: #776
Part of #776 — SOLID architecture debt umbrella.
Phase: P1 · Finding: M2
Problem
modules/worldgen-overworld/src/overworld_generator.zig(1,107 LOC) delegates terrain/biome to collaborators but inlines LOD color computation (biomeGrassTint/biomeFoliageTint/biomeWaterTint, 662-725), tree-hint computation (computeChunkTreeHints/choosePlacedTree/placeTreeOccupancy, 492-621), and material layering (makeMaterialLayers/surfaceTypeForBlock, 884-931).Evidence
(Full evidence and
file:linecitations are in the umbrella #776.)Fix
Extract two collaborators:
lod_coloring.zig(biomeGrassTint, biomeFoliageTint, biomeWaterTint)tree_hints.zig(computeChunkTreeHints, choosePlacedTree, placeTreeOccupancy)Material layering can stay or move to
surface_builder.zig.Verification
nix develop --command zig build test(includes shader validation)-Dskip-present)Constraints
dev; conventional commit (refactor:/feat:)Notes
v1 is otherwise well-decomposed (P6 strength) — this completes that decomposition.
Tracking: #776