Goal
Capture low-risk gains before adding GPU compute. Keep policy, persistence, and procedural generation on CPU while eliminating unnecessary scans, locks, I/O, and draw submission.
Depends on
Phase 0 profiling baselines.
Parallel workstreams
Visibility and coverage
Lifecycle and threading
Draw submission
Far-detail density
Relevant code
modules/world-lod/src/lod_renderer.zig
modules/world-lod/src/lod_manager_generation_ops.zig
modules/world-lod/src/lod_manager_cache_ops.zig
modules/world-lod/src/lod_mesh.zig
modules/world-lod/src/lod_scheduler.zig
modules/worldgen-overworld-v2/src/lod_sampling.zig
CPU/GPU decision
Scheduling, persistence, procedural sampling, and coarse visibility remain CPU work. The GPU receives batched drawing, not generation, in this phase.
Acceptance criteria
- No synchronous disk I/O on the frame/update path.
- Meshing does not hold the global manager lock for its full duration.
- Terrain and water do not independently repeat identical visibility/coverage work.
- MDI reduces LOD submission/draw overhead without visual regressions; fallback remains functional.
- Benchmarks demonstrate lower p95/p99 CPU frame time, not only higher average FPS.
Goal
Capture low-risk gains before adding GPU compute. Keep policy, persistence, and procedural generation on CPU while eliminating unnecessary scans, locks, I/O, and draw submission.
Depends on
Phase 0 profiling baselines.
Parallel workstreams
Visibility and coverage
isCoveredByChunks.Lifecycle and threading
Draw submission
Far-detail density
Relevant code
modules/world-lod/src/lod_renderer.zigmodules/world-lod/src/lod_manager_generation_ops.zigmodules/world-lod/src/lod_manager_cache_ops.zigmodules/world-lod/src/lod_mesh.zigmodules/world-lod/src/lod_scheduler.zigmodules/worldgen-overworld-v2/src/lod_sampling.zigCPU/GPU decision
Scheduling, persistence, procedural sampling, and coarse visibility remain CPU work. The GPU receives batched drawing, not generation, in this phase.
Acceptance criteria