DEFAULT_MAX_PATCHES

const DEFAULT_MAX_PATCHES: 1280

How many patches may be selected at once.

A safety net rather than a working limit, and the lens is what says how much of a net it is. At the flight lens an uncapped whole-disk selection wants between 476 and 1,077 patches across the zoo's twenty-four site descents, so this never binds on a lens a player flies with; at the wide end of the slider it is lower still.

It was 768, then 1,024, and each time it was the field getting deeper. A whole-disk selection costs about ninety patches per level between the horizon and the ground. The band stack pushed surfaceDetailFloor from 7–10 to 10–16 because crater rims are sharp; the presentational tail pushed it to 12–19, because the sub-floor crater band cuts up to 0.8 m and that is over the tolerance a cell is refined against. Every extra level underfoot is another ring of patches. Holding the old cap would have spent this phase's whole point: the worst of the twenty-four descents wants 1,077 and would degrade by a level on the ground, which is exactly where the new detail is.

What that buys costs 346 MB in the corner case. A patch carries positions, normals and both morph targets — 65² vertices, twelve floats apiece, 203 KB — plus two eight-byte cover records, the vertex's own and its morph target's, which is 67.6 KB rather than the 34 one of them is. So a patch is 270 KB, 1,280 of them is 5.4 M vertices and 346 MB of buffers, and the old cap was 243 MB. The number is here so that the next person to want it raised knows what they are buying, and GEOMETRY_CACHE is twice this, which is the number that actually sizes the resident set. Packing the four vertex attributes below float32 halves both and is the outstanding lever; it is measured-before-optimized rather than done here.

It binds at the telephoto end and on a retina window, and by how much is measured rather than adjectival. At 20° the same descents want two to three times the flight lens's count; a 1600×900 window at DPR 2 is 3200×1800 display pixels, one level deeper everywhere, and the Mars landing's hover wants 1,583 patches there against 874 at DPR 1. What the cap does when it binds is COARSEN_STEP below: the tolerance is loosened and the walk retaken, so the disk goes coarse by a stated fraction of a level everywhere the eye is not standing, and the ground underfoot keeps the floor.

The zoom channel goes three levels past that, and no cap covers it. At 20° with the zoom racked to 8× the picture is a 2.5° field at 24,500 px/rad, and Miranda's basin descent wanted 20,174 patches at the old detail floor — an order of magnitude past any cap, past the loosest tolerance, and saturated on every step. That is a telephoto held on a subject rather than a lens anything is flown behind, and the honest answer is the one the cap gives: the disk goes coarse, by a stated amount, rather than the frame going away.

terrainSelect.ts:179