From 6a86102336d30f4a0b2460e6ae39f1c820cd8db5 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Wed, 18 Nov 2026 21:09:42 -0800 Subject: [PATCH 1/2] fix(render): icons drawn over depth no longer flicker An icon drawn over depth set its log depth to exactly the near plane (1.0). Interpolated across the quad, that value can arrive a rounding step or two under czm_writeLogDepth's 0.9999999 cut, which discards the fragment, so a moving icon vanished for a frame now and then, most visibly far away in dense clusters. It now sits 1e-4 m past the near plane, still in front of everything. --- src/render/cesium/iconSetPrimitive.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/render/cesium/iconSetPrimitive.js b/src/render/cesium/iconSetPrimitive.js index f1559019d3..432f78ffd1 100644 --- a/src/render/cesium/iconSetPrimitive.js +++ b/src/render/cesium/iconSetPrimitive.js @@ -261,7 +261,12 @@ void main() { if (overDepth && zclip >= -1.0 && zclip <= 1.0) { gl_Position.z = -gl_Position.w; #ifdef LOG_DEPTH - v_depthFromNearPlusOne = 1.0; + // Just past the near plane, not on it: czm_writeLogDepth discards a + // fragment at or below 0.9999999, and 1.0 interpolated across the quad + // can arrive a rounding step or two under that, dropping the icon for a + // frame as it moves (flicker). 1e-4 m past the near plane is still in + // front of everything the scene draws. + v_depthFromNearPlusOne = 1.0001; #endif } From 5e0842ad81e3b90a76be8127e2123b7d0f93b898 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Wed, 18 Nov 2026 21:10:13 -0800 Subject: [PATCH 2/2] Add the changelog entry for #1835 --- changelog.d/1835-icon-near-plane-flicker.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/1835-icon-near-plane-flicker.md diff --git a/changelog.d/1835-icon-near-plane-flicker.md b/changelog.d/1835-icon-near-plane-flicker.md new file mode 100644 index 0000000000..b6cf5c620c --- /dev/null +++ b/changelog.d/1835-icon-near-plane-flicker.md @@ -0,0 +1,3 @@ +- Icons drawn over depth (aircraft, vessels) no longer vanish for a frame now + and then in dense far-away clusters: they sit just past the near plane instead + of exactly on it, where rounding could discard them (samehkhamis, #1835).