Goal
Replace conventional CPU-expanded LOD3/4 meshes with compact height/material tiles and a GPU-friendly reusable representation. This is the main architectural step toward Distant Horizons-like scale.
Depends on
Phases 0-3. Requires measured evidence that CPU meshing, uploads, vertex memory, or vertex/raster work remains a limiting factor after earlier fixes.
Design spike
Before production implementation, compare:
- Reusable indexed grid + compact tile textures/storage buffers.
- Compute expansion into pooled vertex/index buffers.
- Mesh shaders only on supported hardware with a conventional fallback.
Evaluate transfer bytes, VRAM, shader bandwidth, seams, normals, edit latency, platform support, and maintenance cost. Do not assume compute expansion is automatically superior.
Parallel workstreams after design approval
Relevant code
modules/world-core/src/lod_data.zig
modules/world-lod/src/lod_mesh.zig
modules/world-lod/src/lod_geometry.zig
modules/world-lod/src/lod_seam.zig
modules/world-lod/src/lod_vertex_pool.zig
assets/shaders/vulkan/terrain.vert
assets/shaders/vulkan/terrain.frag
assets/shaders/vulkan/water.frag
CPU/GPU decision
CPU keeps procedural generation, edits, persistence, hierarchy policy, and compact-tile production. GPU handles expansion/rendering, normals where local, visibility, and drawing.
Acceptance criteria
- LOD3/4 upload bytes and resident geometry memory are materially lower than CPU-expanded meshes.
- Worker mesh time for far levels is eliminated or substantially reduced.
- Visual baselines show no unacceptable cracks, normal discontinuities, water artifacts, or transition instability.
- Quality can scale independently from raw vertex uploads.
- Unsupported devices use a maintained fallback.
Risks
Quantization artifacts, shader bandwidth replacing vertex bandwidth, difficult seams, edit propagation latency, and increased pipeline complexity. A design review is required before committing to mesh shaders.
Goal
Replace conventional CPU-expanded LOD3/4 meshes with compact height/material tiles and a GPU-friendly reusable representation. This is the main architectural step toward Distant Horizons-like scale.
Depends on
Phases 0-3. Requires measured evidence that CPU meshing, uploads, vertex memory, or vertex/raster work remains a limiting factor after earlier fixes.
Design spike
Before production implementation, compare:
Evaluate transfer bytes, VRAM, shader bandwidth, seams, normals, edit latency, platform support, and maintenance cost. Do not assume compute expansion is automatically superior.
Parallel workstreams after design approval
Relevant code
modules/world-core/src/lod_data.zigmodules/world-lod/src/lod_mesh.zigmodules/world-lod/src/lod_geometry.zigmodules/world-lod/src/lod_seam.zigmodules/world-lod/src/lod_vertex_pool.zigassets/shaders/vulkan/terrain.vertassets/shaders/vulkan/terrain.fragassets/shaders/vulkan/water.fragCPU/GPU decision
CPU keeps procedural generation, edits, persistence, hierarchy policy, and compact-tile production. GPU handles expansion/rendering, normals where local, visibility, and drawing.
Acceptance criteria
Risks
Quantization artifacts, shader bandwidth replacing vertex bandwidth, difficult seams, edit propagation latency, and increased pipeline complexity. A design review is required before committing to mesh shaders.