Skip to content

ExponentialFog

Exponential fog effect, assignable to a scene.

This fog model uses an exponential function based on view distance to simulate atmospheric fading. It is intended to be assigned to a [Scene](/reference/nodes/scene)'s fog field at runtime.

cpp
my_scene->fog = vglx::ExponentialFog::Create(0x888888, 0.15f);

INFO

Derives from Fog and inherits all public properties and methods.

Construction

Constructors


ExponentialFog()

cpp
vglx::ExponentialFog::ExponentialFog(Color color, float density)
ParameterDescription
colorFog color.
densityDensity factor.

Constructs an ExponentialFog object.

Factories preferred


ExponentialFog::Create() auto

cpp
static auto vglx::ExponentialFog::Create(Color color, float density)
ParameterDescription
colorFog color.
densityDensity factor.

Creates a shared pointer to an ExponentialFog object.

Properties

density float

cpp
float density

Density factor controlling fog steepness.

Functions

GetType() FogType virtual

cpp
FogType vglx::ExponentialFog::GetType() const override

Returns fog type.

Released under the MIT License.