Log inGet started
Package

twilight.shader

Newest version

README.md

firstlight.sky.twilight

The band of twilight over the southern horizon of a polar night, painted on a dome round the station. A surface shader that emits its own light and adds to the sky behind it: where the band is nothing it adds nothing, so the dome is invisible outside it.

Every value is a function of the view direction, so the band stands at the same place in the sky from anywhere on the plain and the dome is only a canvas.

PropertyMeaning
sun_dirUnit vector toward the sun. The band stands over its azimuth; the glow round it arrives as it nears the horizon.
twilight0..1, how open the noon window is. Sets the band's height, width, brightness and how far violet and rose reach into it.
intensityOverall gain.
blue / violet / roseThe band's colours from its top to its foot.

Wear it with render: { type: additive, depth_write: false, cull: none } on a dome inside the camera's far plane; firstlight.sky builds that dome and drives these properties from the game clock.