mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 18:52:18 +00:00
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:
1 parent
0b8cb855fa
commit
65e30546dd
2 files changed
+35
-1
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user