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