Skip to content

feat(dox): sun-lit shading and atmosphere on the globe - #284

Merged
craig-o-curtis merged 1 commit into
mainfrom
dox-globe-sun-shading
Sep 25, 2026
Merged

craig-o-curtis merged 1 commit into
mainfrom
dox-globe-sun-shading

Conversation

@craig-o-curtis

@craig-o-curtis craig-o-curtis commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Shade the globe per pixel from the sun's real position instead of flat day and night fills. Stacked translucent caps were tried first and left rings on the day side and stripes near the edge.

Changes

  • Day light follows Lambert's cosine law, gamma-encoded, and carries into civil twilight; night eases in over 18° of twilight.
  • A thin haze on the lit edge, and a glow ring outside the globe that is strongest on the sun's side and brightens when backlit.
  • City lights switch on at civil dusk, not at the horizon.
  • Ordered dither against 8-bit banding; the buffer is repainted only when the view or the sun moves.
  • Glow and haze are tokens, turned off under reduced transparency and raised contrast.

New pure module apps/dox/src/lib/globe-shading.ts with its own tests; context/dox/built.md records the design.

Why a separate PR

This commit was first carried on #282 (INT-58 billingTimeline). It is split out so it can get its own visual review.

Shade the globe per pixel from the sun's real position instead of flat
day and night fills. Stacked translucent caps were tried first and left
rings on the day side and stripes near the edge.

- Day light follows Lambert's cosine law, gamma-encoded, and carries
  into civil twilight; night eases in over 18° of twilight.
- A thin haze on the lit edge, and a glow ring outside the globe that
  is strongest on the sun's side and brightens when backlit.
- City lights switch on at civil dusk, not at the horizon.
- Ordered dither against 8-bit banding; the buffer is repainted only
  when the view or the sun moves.
- Glow and haze are tokens, turned off under reduced transparency and
  raised contrast.
@craig-o-curtis craig-o-curtis added enhancement New feature or request gmt monorepo labels Sep 25, 2026
@craig-o-curtis craig-o-curtis added this to the Dox milestone Sep 25, 2026
@craig-o-curtis
craig-o-curtis enabled auto-merge (squash) September 25, 2026 12:23

@baldurpan baldurpan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌐

@craig-o-curtis
craig-o-curtis merged commit c0de0d7 into main Sep 25, 2026
38 checks passed
@craig-o-curtis
craig-o-curtis deleted the dox-globe-sun-shading branch September 25, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request gmt monorepo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants