Skip to content

Conversation

Copy link

Copilot AI commented Jan 14, 2026

Improves sun realism with multi-layer atmospheric glow and procedural solar flares while maintaining mobile/laptop performance targets.

Changes

Enhanced Glow Shader (src/shaders/sun/glow.frag)

  • Multi-layer corona: inner bright core + outer soft falloff using dual Fresnel calculations
  • Color gradient: yellow-white inner → orange-red outer
  • Glow radius increased 1.01x → 1.4x with intensity 1.0 → 1.5

Solar Flares (new)

  • 6 procedural flare meshes using plane geometry at 2.0-3.5x sun radius
  • Fragment shader with 3-octave FBM noise for turbulent prominence animation
  • Additive blending with independent timing offsets per flare
  • Cached repeated calculations (abs(uv.x)) for shader performance

Animation (src/main.js, src/sun.js)

  • Sun rotation at 0.05 rad/s to expose flares over time
  • Per-frame uniform updates for flare time-based animation
  • Flares oriented outward via lookAt(position * 2) instead of toward origin

Performance Impact

  • Bundle size: +0.07 KB
  • Geometry: 6 planes (2 tris each) + 1 sphere (32×32 segments)
  • GPU load: Moderate shader complexity, all animation GPU-side

Visual Result

Before:
Before

After (distant view):
After distant

After (close view):
After close

The enhanced corona is clearly visible at all distances. Flares animate with turbulent motion and become visible as the sun rotates.

Original prompt

Help me to improve the realism of the sun by adding a glow a solar flares. Keep performance in mind - I would like this to run on most modern mobile and laptop devices.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link
Contributor

vercel bot commented Jan 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
solar-simulation-reboot Ready Ready Preview, Comment Jan 14, 2026 11:25pm

Co-authored-by: mitchcamza <63720891+mitchcamza@users.noreply.github.com>
…are orientation

Co-authored-by: mitchcamza <63720891+mitchcamza@users.noreply.github.com>
Copilot AI changed the title [WIP] Add glow and solar flares to sun Add enhanced glow and animated solar flares to sun Jan 14, 2026
Copilot AI requested a review from mitchcamza January 14, 2026 23:26
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.

2 participants