Aurora nebula in the city sky#106
Merged
Merged
Conversation
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>
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>
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.
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 is0.022, well under the0.5bloom 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— slider0–0.15, default0.022(max still sits under the bloom threshold).Both are
Refresh-route SCENE fields, pushed intouAuroraEnabled/uAuroraIntensityby 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:
(lon, lat)grid, which crowded cells toward the poles and made stars line up along meridians.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).Also
Drops the global
:focus-visiblering on#app-body(thetabIndex=-1skip-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.