Skip to content

Aurora nebula in the city sky#106

Merged
thalida merged 8 commits into
mainfrom
feat/issue-102-sky-aurora
Jul 17, 2026
Merged

Aurora nebula in the city sky#106
thalida merged 8 commits into
mainfrom
feat/issue-102-sky-aurora

Conversation

@thalida

@thalida thalida commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Closes #102

A faint gem-hued aurora drifting through the live city sky, with SCENE controls to toggle and tune it, plus a couple of star-field fixes that surfaced along the way.

Aurora

Ports the LandingBackdrop's fbm domain warp into sky.frag.glsl, but the domain is the world view direction (3D fbm) instead of screen UV, so the nebula wraps the full sphere seamlessly. That matters here because the island floats in space, so the lower hemisphere is visible too. Hue sweeps through the four gems (cyan → purple → magenta → lime), bent by the warp into curved ribbons. Kept very subtle: default peak add-on is 0.022, well under the 0.5 bloom threshold, so it tints the sky without glow-bombing through the bloom pass.

Controls (Scene → Aurora, mirroring the Stars/Fog convention):

  • AURORA_ENABLED — toggle, default on.
  • AURORA_INTENSITY — slider 00.15, default 0.022 (max still sits under the bloom threshold).

Both are Refresh-route SCENE fields, pushed into uAuroraEnabled / uAuroraIntensity by the existing settings effect with no rebuild. Gem colors are fixed brand values, hardcoded in the shader (the --cc-gem-* tokens don't vary by theme, so there's nothing to track).

Star field

Two fixes to how stars scatter, both visible looking straight up or down:

  • Cube-face projection replaces the equirectangular (lon, lat) grid, which crowded cells toward the poles and made stars line up along meridians.
  • Hash-without-sine (Dave Hoskins) replaces fract(sin(dot(...))), which banded into moiré, worse at the larger coordinates the face grid produced. Star presence, placement, and twinkle phase now come from decorrelated hashes keyed on (cell, face).
  • Each star gets a random baseline brightness biased toward the dim end, so the field has depth (a few bright ones among many faint) and each star twinkles relative to its own baseline.

Also

Drops the global :focus-visible ring on #app-body (the tabIndex=-1 skip-link / post-dialog focus catcher), which was drawing a 2px accent outline around the whole city whenever focus landed there.

Notes

GLSL can't be compile-tested in vitest (no GPU), so the shader was verified visually across camera angles, themes, and bloom on.

thalida and others added 7 commits July 16, 2026 23:32
Port LandingBackdrop's fbm domain warp into the sky fragment shader,
using the world view direction (dome-projected) as the domain so
gem-hued bands drift up from the horizon. Hardcoded, subtle, tuned to
sit under the bloom threshold. Theme uniforms + settings come after a
look is approved.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Swap the aurora's 2D dome projection for 3D fbm over the world view
direction so the nebula wraps the whole sky seamlessly, and drop the
horizon band mask. The island floats in space, so the lower hemisphere
is visible and the aurora should surround it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drift 0.03 -> 0.006 (5x slower) and peak intensity 0.32 -> 0.16 so the
nebula reads as a calm, subtle backdrop rather than fast and saturated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
#app-body is tabIndex=-1: the skip-link target and post-dialog focus
catcher, not an interactive control. The global :focus-visible ring drew
a 2px accent outline around the whole content region (read as a ring
around the city) whenever focus landed there. Suppress it since focus
only passes through on its way to the real content.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fix the star field reading as lines/repeats:
- Replace the equirectangular (lon,lat) grid with a cube-face projection,
  which has no polar singularity, so stars no longer crowd into meridian
  lines when looking straight up or down.
- Replace the fract(sin(dot(...))) hash with a hash-without-sine (Hoskins),
  keyed on (cell, face); the sin hash banded into visible moiré, worse at
  the larger coordinates the face offset produced.
- Give each star a random baseline brightness biased toward the dim end,
  so the field has depth (a few bright stars among many faint ones) and
  each star twinkles relative to its own baseline.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
INTENSITY 0.16 -> 0.022 so the aurora barely tints the sky and sits well
under the bloom threshold.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Update the star-scatter guard to match the new shader: hash13/hash33 over
a cube-face grid instead of the removed fract(sin(dot(...))) hash.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thalida thalida linked an issue Jul 17, 2026 that may be closed by this pull request
Add AURORA_ENABLED + AURORA_INTENSITY to the SCENE store and an Aurora
group in the Scene controls, wired through to uAuroraEnabled /
uAuroraIntensity uniforms (pushed by the existing settings effect, no
rebuild). The shader gates the nebula on the toggle and uses the
intensity uniform as its peak add-on in place of the hardcoded value.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thalida
thalida merged commit 3fe1b9a into main Jul 17, 2026
1 check passed
@thalida
thalida deleted the feat/issue-102-sky-aurora branch July 17, 2026 03:57
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.

Aurora in the city sky (domain-warped gradient)

1 participant