Skip to content

Revert "explorer: fix halo cutoff over terrain (disableDepthTestDistance)" (#181)#183

Merged
rdhyee merged 1 commit intoisamplesorg:mainfrom
rdhyee:explorer-halo-revert
May 9, 2026
Merged

Revert "explorer: fix halo cutoff over terrain (disableDepthTestDistance)" (#181)#183
rdhyee merged 1 commit intoisamplesorg:mainfrom
rdhyee:explorer-halo-revert

Conversation

@rdhyee
Copy link
Copy Markdown
Contributor

@rdhyee rdhyee commented May 9, 2026

Reverts #181 (d681758).

Reported behavior: ${\textsf{terrible}}$ — disabling depth test on point primitives caused regressions worse than the original halo crescents. Rolling back so prod returns to post-#180 state while we have Codex review d681758 and propose a corrected fix.

Original issue (still open): halos added in #180 expose terrain depth-test occlusion as crescents on hilly land, and at close zoom the dots vanish entirely.

Next steps:

  • Merge this revert + deploy to restore prod
  • Codex review of d681758 to identify a fix that doesn't regress whatever this just regressed
  • Re-attempt halo terrain fix in a new PR

Refs #178, #180.

🤖 Generated with Claude Code

@rdhyee rdhyee merged commit 9d9291c into isamplesorg:main May 9, 2026
1 check passed
rdhyee added a commit that referenced this pull request May 10, 2026
…terrain (closes #185) (#198)

Cluster and sample point primitives are placed at altitude=0 (the WGS84
ellipsoid surface). With Cesium world terrain enabled, terrain mesh in
hilly regions (Troodos in Cyprus, hill country around Birmingham AL,
etc.) rises hundreds to thousands of meters above ellipsoid — so points
at altitude=0 are physically *underground* in those regions and get
depth-culled by Cesium's standard per-pixel depth test.

The fix is one new property at each of the three .add() call sites:

  disableDepthTestDistance: POINT_DEPTH_TEST_DISTANCE  // 2.0e6 = 2,000 km

Bypass scope: only when the camera is closer than 2,000 km, which covers
every realistic interactive altitude (point mode <120 km, res8 cluster
up to ~300 km, res6 up to ~3,000 km — the upper end is technically
outside the bypass but at that altitude dots are tiny anyway).

Why bounded (2.0e6) and not POSITIVE_INFINITY: PR #181 used Infinity and
caused back-side-of-globe primitive bleed-through plus broke pickability
(was reverted via #183). A 2,000 km bound preserves globe-ellipsoid
occlusion at long range while bypassing terrain occlusion at every
interactive zoom.

Hypothesis source: Codex review of #185 identified sea-level placement
as the most likely root cause. Confirmed experimentally by runtime-
patching the live deploy:

  T0 baseline (no fix)                          Cyprus interior: ~0 dots
  T1 swap to EllipsoidTerrainProvider           minor improvement
  T2 raise primitives to height=5000m           significant improvement
  T3 disableDepthTestDistance: 2.0e6 (this PR)  significant, equivalent
                                                to T2, no back-side bleed

Closes #185.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant