explorer: fix halo cutoff over terrain (disableDepthTestDistance)#181
Merged
rdhyee merged 1 commit intoisamplesorg:mainfrom May 9, 2026
Merged
explorer: fix halo cutoff over terrain (disableDepthTestDistance)#181rdhyee merged 1 commit intoisamplesorg:mainfrom
rdhyee merged 1 commit intoisamplesorg:mainfrom
Conversation
The white halos added in isamplesorg#180 made a pre-existing terrain depth-test artifact visible: dots positioned at altitude=0 get partly (or entirely) occluded by Cesium World Terrain wherever land elevation rises. Without halos, the truncation read as a smaller dot. With halos, the white ring exposes the cut as a crescent — and over higher terrain, the whole sprite disappears. Fix: add `disableDepthTestDistance: Number.POSITIVE_INFINITY` to all three PointPrimitive add() sites (h3Points x2 + samplePoints), matching the existing pattern used by `pointLabel` (line 843) — points render always-on-top regardless of intervening terrain. Reported view: explorer.html#v=1&lat=33.27&lng=-86.24&alt=311435 (Birmingham AL hill country). Verified locally — dots render as full circles; previously- missing dots over higher terrain are visible again. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hotfix for the halo regression introduced in #180.
The white halos exposed a pre-existing Cesium terrain depth-test artifact: PointPrimitives are positioned at altitude=0, so wherever Cesium World Terrain has elevation, the front face of the terrain mesh occludes part of the sprite. Without halos, that truncation read as a slightly smaller dot. With halos, the white ring made the cut glaringly obvious — appearing as crescents — and over higher terrain the sprite vanishes entirely.
Reported view:
explorer.html#v=1&lat=33.2706&lng=-86.2375&alt=311435(Birmingham, AL hill country) — many dots showed only as half-moon halos or were entirely missing.Fix
Add
disableDepthTestDistance: Number.POSITIVE_INFINITYto all threePointPrimitive.add()sites (h3Points x2 cluster-mode + samplePoints x1). This matches the existing pattern already used bypointLabelat line 843 — points render always-on-top regardless of intervening terrain.Trade-off
With depth test off, points on the far side of the globe could in principle bleed through. In practice at the zoom levels users hit (regional → world), the cluster aggregation hides this, and Cesium's frustum culling still removes truly back-facing primitives. Standard fix per Cesium docs.
Verified locally
quarto render+ Playwright at the reported camera (lat=33.27, lng=-86.24, alt=311km):Test plan
https://isamples.org/explorer.html#v=1&lat=33.2706&lng=-86.2375&alt=311435&heading=360.0and confirm full-circle dots replace the previous crescents🤖 Generated with Claude Code