Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Depth range from the ground: far bodies, their orbits and rings tie or invert in the 24-bit depth buffer

Open
#175 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, three.js

Research direction

Start by reading the depth-buffer and projection setup, then check the composite and Cesium depth handoff described in CESIUM.md and portal-netgl. Compare reversed-Z, logarithmic depth, and analytic occlusion against the stated telescope-FOV cases; done means Jupiter occludes the far halves of its moons' orbits, Saturn occludes its far ring arc, the Moon hides background stars, and space views retain parity.

Written by the indexing model from the issue text.

Description

track:rendering

Found while fixing the atmosphere dashes over Jupiter (#174).

Problem

From Earth's surface the near plane is ~100 m, so every body beyond a few million km lands on or one 24-bit step under the far plane. Depth can then no longer order them:

  • Orbits over their planet: Ganymede's orbit line ties with Jupiter's disc, and overlays pass the depth test on a tie, so the far half of the orbit draws across Jupiter (telescope FOV from the ground).
  • Rings: Saturn's far ring arc draws over the disc from the ground.
  • The Moon and stars: catalogue stars, pulled to 0.999999·w, sit nearer than the Moon from the ground (≈0.9999995), so a bright star behind the Moon could show through it.

#174 fixed the atmosphere pass's own misreading of these depths; the ordering problem remains.

Options

  • Reversed-Z with a float depth buffer (WebGL2: DEPTH_COMPONENT32F plus a reversed projection): near-uniform relative precision over the whole range. three.js supports reverseDepthBuffer (r163+); check the composite and Cesium's depth handoff (CESIUM.md) and portal-netgl.
  • Logarithmic depth (three's logarithmicDepthBuffer): simple, but writes gl_FragDepth, which costs early-z and touches every custom shader.
  • Analytic occlusion: overlays and background test against the bounding spheres of nearer bodies in the shader. Targeted, no buffer change.

Done when

From Earth's surface at a telescope FOV, Jupiter hides the far half of its moons' orbits, Saturn's disc hides the far ring arc, and the Moon hides the stars behind it; nothing changes in space views (parity).


Generated by Claude Code

Dominant language
JavaScript
Stars
55
Forks
4
Avg merge
9h 32m
Merged PRs (30d)
136

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from celestiary/web

All issues in celestiary/web

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.