Renderer · interface

FogSunGlow

The sun's light scattered toward the eye by the haze: a glow in the sun's direction, as dust and droplets throw forward what they catch.

Explained in Hello world.

interface FogSunGlow
import type { FogSunGlow } from '@driftengine/core';

In depth

Added to what the haze returns rather than mixed with it, by as much of the ray past start as the haze hides: a mountain range seen into a low sun burns gold at its distance, and the figures a few metres off do not. What it gives up is the light's own shape: the glow is a lobe about one direction, cos^exponent of the angle from it, not light scattered along the ray through the shadows the sun's map knows of — the global medium is that one.

Properties

NameTypeDescription
colorVec3The glow looking straight along direction through haze that hides everything.
exponentnumberHow tight the glow is about the sun: the cosine of the angle from it, to this power.
startoptionalnumberMetres past the haze's own start before the glow begins. Default 0.
directionoptionalVec3Surface → the light the glow surrounds. Absent, the environment's directionalDir.