Renderer · interface

FogOptions

Explained in Hello world.

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

Properties

NameTypeDescription
colourreadonlyRgb
densityreadonlynumberExtinction per metre at the camera's own height, not at the base.
heightFalloffreadonlynumberReciprocal scale height of the haze, per metre. 0 is a uniform medium.
eyeYreadonlynumberThe camera's height, so a fragment's own height is one subtraction away.
underwaterColourreadonlyRgb
underwaterDensityreadonlynumber
underwaterFactorreadonlynumber
modereadonlynumberMEDIUM_FOG integrates a medium; LINEAR_FOG ramps between near and far.
nearreadonlynumberWhere haze begins: the ramp's start in linear mode, and in the medium the distance along the ray it is integrated from (Atmosphere.fogStart), 0 at the camera.
farreadonlynumber
density2readonlyoptionalnumberThe medium's second layer: its extinction per metre at the camera's height. Absent, none.
heightFalloff2readonlyoptionalnumberAnd its reciprocal scale height.
floorreadonlyoptionalnumberThe least of a surface the haze must leave, Atmosphere.fogMaxOpacity's complement. Absent or 0, no floor.
cutoffreadonlyoptionalnumberMetres past which the haze hides nothing. Absent or 0, none.
glowColourreadonlyoptionalRgbThe sun's glow in the haze: its colour. Absent or black, none.
glowExponentreadonlyoptionalnumberThe glow's lobe: the cosine of the angle from its light, to this power.
glowDirectionreadonlyoptionalRgbSurface → the glow's light, a unit vector.
glowStartreadonlyoptionalnumberMetres past the haze's start before the glow begins.