SIGN IN SIGN UP

fix: sample the center elevation from the rendered terrain surface (#8230)

* fix: sample the center elevation from the rendered terrain surface

The center elevation was read from the DEM at the transform's tile zoom, which can differ from the drawn terrain surface. At the end of a gesture the recalculated center and the next frame then disagreed, moving the camera vertically. Use the rendered-surface lookup everywhere the center elevation is set.

* perf: reset the terrain elevation cache only when the renderable tiles change

The render loop cleared the elevation samplers and coverage index every frame, so the center elevation lookup rebuilt the index each time. TerrainTileManager.update() now reports whether the set of renderable tiles changed and the cache is reset only then.

* test: exercise the terrain tile manager update through its public API

* refactor: name the terrain tile update result before testing it
J
John Carmack committed
0d49d14ec56c89f335cbd74264836d92653abe2d
Parent: a4ca63c
Committed by GitHub <noreply@github.com> on 8/25/2026, 7:56:33 PM