Log inGet started
World

Spooky Spook Spook

Branchmain
Branchesmain
Commitcbb5416a1f

README.md

crypt_sky

The Spooky Spook Spook night sky, a @domain: sky shader. It writes only fragment(in: SkyInput). Everything in it is procedural and animated on in.time:

  • Gradient: a deep violet-black zenith fades to a violet horizon (zenith_color, horizon_color, ground_color).
  • Horizon glow: a candle-amber band hugs the skyline and a sickly ecto-green band sits just above it. Both wander in azimuth and breathe over time (glow_amber, glow_green, glow_intensity).
  • Stars: two layers of twinkling stars from a 3D cell hash, so there is no seam and no pinch at the pole (stars_intensity).
  • Moon: a large moon toward moon_dir (xyz, toward the moon). It has fbm maria, two sizes of crater with bowls and rims, limb darkening, a slow ectoplasmic shimmer, a cold halo and a faint shimmering green ring at about 2.4 radii. Controls: moon_size (angular radius in radians), moon_brightness, halo_intensity, ring_intensity.
  • Aurora: domain-warped ectoplasm ribbons plus a violet veil, projected onto a high virtual ceiling so they converge toward the horizon (aurora_intensity).
  • Mist: ghostly bands crawling along the horizon (mist_intensity).
  • Lightning: a sheet flash toward flash_dir plus a jagged bolt shaped by flash_seed, scaled by lightning. It is 0 at rest, and CryptSky pulses it at runtime.

time_scale speeds up or slows down every animation, and exposure scales the output. The output is linear radiance, and the sky domain's display transform tone-maps it.

game.sky.crypt_sky_mat is the material over this shader. The CryptSky component points a Skybox at it. The engine's volumetric cloud layer composites over this sky, so the moon and stars show only through gaps in the clouds.