pub fn reference_chunk_mesh(res: u32, material: &Gd<Material>) -> Gd<ArrayMesh>Expand description
Build a Godot ArrayMesh reference chunk at resolution res.
The mesh contains verts_per_chunk(res) vertices (barycentric coords stored as
Vector3(wa, wb, wc)) and res*res triangles, using the canonical (i,j) vertex
order from chunk_grid. This mesh is the template for all chunk MultiMesh instances;
the vertex shader reads actual 3-D positions from the vertex-pool texture via
INSTANCE_CUSTOM.r (the slot index).
Mirrors the reference_triangle idiom in crates/celestialsim/src/faces.rs.