SLAB_AT

const SLAB_AT: number

Where each rung's sphere-intersection limits sit, four words per rung in walk order: floor(cells²) and ceil(cells²), each as a high and a low u32 of a 48-bit integer.

levelContribution rejects a lattice cell that misses the unit sphere with Σ (m/cells)² > 1 over the cell's nearest corner and < 1 over its farthest, and that is a decision: a cell holds a crater or it does not. The corner coordinates are integers over one float, so successive cells' values sit 1/cells² apart — 2 × 10⁻⁷ at a rung of 2,300 cells and 10⁻¹² across the tail — and a float32 evaluation of the same test lands on the wrong side of it wherever that spacing is under its own resolution, which is a whole crater present on one processor and absent on the other. Σ m² > cells² in exact integers is the same decision, so the kernel compares 48-bit sums against these. Real arithmetic and the CPU's float64 can still disagree on a cell whose sum is within a part in 10¹⁵ of the limit; across the tail's rungs that is a cell in about 10¹³.

The first uvec4 boundary past the draw thresholds, derived rather than written, because the thresholds are one word a rung from LEVEL_DRAW_AT and a longer ladder would otherwise write its last thresholds over the first rung's limits — silently, with nothing between the two blocks but the arithmetic. Fifty-six today, with two words to spare.

universe/src/terrainKernel.ts:298