Distance in mesh X/Z units to the nearest topological boundary edge.
edges is reusable scratch, one u64 per triangle index plus input vertex. Sorted
undirected edge keys compact boundary edges in place; no heap is allocated.
Separate surfaces keep separate boundaries. Streamed tile seams need shared
topology before this authoring pass, not a shader guess about their outline.