Expand description
Phase 1 debug visualization of the CPU chunked-quadtree selection: turn a
Vec<Chunk> into a per-LOD-coloured ArrayMesh (throwaway CPU mesh — Phase 2
replaces this with GPU realize through the nodes pipeline). The pure helpers
(lod_color, build_debug_mesh) return plain Rust data so they unit-test
without a running Godot engine; the Godot node converts them to engine-backed
Packed*Array/Color and wires them to a MeshInstance3D each frame.
Structs§
- Celestial
Quadtree Debug - Phase 1 debug node: each frame, select the chunked-quadtree cut on the CPU and draw it as a per-LOD-coloured mesh. Additive — does not touch the clipmap.
- Debug
Mesh Data - CPU vertex arrays for one debug frame. Plain
Vecs so the builder is headlessly testable; the node converts toPacked*.
Functions§
- build_
debug_ mesh - Realize the selected chunks into a per-LOD-coloured triangle soup. Each chunk
becomes
chunk_res×chunk_restriangles all carrying the chunk’s LOD colour. - lod_
color - Distinct linear-RGB colour per LOD level. Same hue spin (
level * 0.137) and HSV→RGB construction as the existingterrain_surfacelayer_color, so the debug palette matches the rest of the project. Returns plain[f32;3](no engine-backedColor) so it is testable headlessly.