CrowPSXDocumentationv1.1.0Get CrowPSX ↗
Docs/Procedural skybox

SHADER REFERENCE

Procedural skybox

Environment lighting, celestial bodies, stars, clouds, and moon phases.

PACKAGE VERSION 1.1.0
On this pageCrowPSX/Skybox/ProceduralEnvironment lightingMoon phases

Assign a material using CrowPSX/Skybox/Procedural in Lighting > Environment > Skybox Material.

  • Use the sky gradient and final grading controls for the environment base.
  • Environment Lighting keeps Lighting > Environment Lighting > Source set to Skybox. Filter Skybox Ambient Color optionally reduces or tints the generated ambient probe without recoloring the visible sky or its reflections, Auto Apply To Active Scene pushes changes as you edit, and Apply To Scene applies them once on demand. The filter affects the realtime fallback probe; rebake lightmaps and baked Light Probes to pick up a revised environment color.
  • Enable the Sun, Moon, or extra celestial bodies as needed. Celestial masks can use Texture Alpha, Brightness, or Alpha × Brightness.
  • Enable Moon Phase for an analytic lunar cycle with phase presets, terminator controls, and earthshine.
  • Stars follow spherical latitude rings. Amount controls population; Size and Brightness remain independent.
  • Cloud self-lighting follows the strongest enabled Sun or Moon above the horizon.
  • HDR exposure and celestial highlights remain unclamped for bloom, reflection probes, and environment capture; tone mapping belongs to the camera/output pipeline.

CrowPSX/Skybox/Procedural#

A procedural skybox with a zenith/horizon/ground gradient, final color grading and posterization, multiple textured celestial bodies, analytic moon phases with earthshine, configurable stars, one or two cloud layers, cloud masks and lighting, transparent surroundings/skyline texture, global rotation, and independent layer motion.

The skybox preserves HDR output from exposure, celestial bodies, and glows. Posterization quantizes HDR values without clamping them to white, allowing HDR cameras, bloom, reflection probes, and environment capture to retain highlight energy. The final camera or output pipeline remains responsible for tone mapping.

Celestial textures support Texture Alpha, Brightness (Luminance), and Alpha × Brightness masking. Brightness is suitable for opaque images with black backgrounds. Alpha × Brightness preserves authored transparency while removing dark pixels inside it, and is identical to Brightness when the source texture has no alpha channel. Celestial and star texture sampling is restricted to their visible angular footprints and occupied star cells.

Cloud self-shading follows the strongest enabled above-horizon Sun or Moon. Its sampling direction accounts for light elevation on the flat cloud deck, and the Moon's contribution follows its illuminated phase.

Environment lighting#

The skybox inspector carries an Environment Lighting group that keeps Lighting > Environment Lighting > Source set to Skybox while the material is the active skybox. Filter Skybox Ambient Color optionally reduces or tints the ambient probe Unity generates from the sky; the visible sky and its skybox reflections are not recolored. Auto Apply To Active Scene pushes edits to the scene as they are made, and Apply To Scene does it once on demand.

The filter affects the realtime fallback ambient probe. Baked lightmaps and manually baked Light Probes have to be rebaked to receive a revised environment color.

Moon phases#

The Moon phase cycle uses 0 for New Moon, 0.25 for First Quarter, 0.5 for Full Moon, 0.75 for Last Quarter, and 1 for New Moon again. Eight inspector presets cover the intermediate crescent and gibbous phases. Terminator Rotation changes the phase orientation, Terminator Softness feathers its boundary, and Earthshine controls visibility on the unlit side. Moon glow and cloud glow follow the illuminated fraction while the complete lunar silhouette continues to occlude stars.

CrowPSX 1.1.0 · CrowBite
Shader reference and setup guides.