Renderer · interface

FogLayer

A layer of haze: how thick it is where it is thickest, and how fast it thins above that.

Explained in Hello world.

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

In depth

In natural units, as fogDensity is: a haze authored in base two, its surviving light 2^(−∫ρ) and its density falling as 2^(−f·Δy), is the layer density: ρ · (ln 2)², heightFalloff: f · ln 2 here — the integral of base two's exponential carries one ln 2 of its own, and the transmittance's base the other.

Properties

NameTypeDescription
densitynumberExtinction per metre at baseY.
heightFalloffnumberReciprocal scale height, per metre: 0 is a layer of even density.
baseYnumberThe height it is thickest at.