fix(globe): Navara sprites keep a full rewrite when a commit follows it

A sprite/point set uploads its instances by update range. When the camera
went far enough to move the set's origin, update() rewrote every instance
(relative to the new origin) — and a commit later in the same frame
cleared the ranges and kept only its own, so the GPU never got the
rewrite: the instances not committed again drew offset by the origin move
(a military glyph at the orbit pose drew 45 px from its point after the
global → city → orbit sequence; the CPU picks, the probe and Cesium had it
in place). Ranges now add up until three uploads them (it clears them
after the upload).

Found by the military side-by-side (11b); flights' sprites had the same
exposure since 10b.
This commit is contained in:
German Khokhlov committed 2026-10-17 06:49:53 +04:00
1 parent 0b8cb855fa
commit 65e30546dd
2 files changed
+35 -1

No files matched your search

+3 -1
View File
@@ -262,7 +262,9 @@ export function createMoverMesh(
[colorAttribute, 4],
[uvAttribute, 4],
]) {
value.clearUpdateRanges();
// Ranges add up until three uploads them (and clears them): a
// partial commit after a full rewrite in the same frame (an origin
// move) must not drop the rewrite — sprites drew offset by the move.
value.addUpdateRange(from * size, (to - from) * size);
value.needsUpdate = true;
}