Click or drag to resize
DigitalRuneFogHeightFalloff Property
Gets or sets the height falloff.

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public float HeightFalloff { get; set; }

Property Value

Type: Single
The height falloff.
Remarks

The fog density can be specified using either Density and HeightFalloff or Density0 and Density1. Density defines the fog density at height 0 and the HeightFalloffdetermines whether the fog density increases or decrease with height. Alternatively, the fog density can be set at two reference heights using Density0 and Density1. The properties are coupled: If Density or HeightFalloff are changed, Density0 and Density1 are updated automatically and vice versa. In practice, you will use either Density and HeightFalloff, or Density0 and Density1 to control the fog settings.

If this value is greater than 0, the fog density decreases with height. Higher HeightFalloff values let the fog density decrease faster.

If this value is 0, then the fog density is height-independent and increases only with the distance from the camera.

If the value is less than 0, the fog density increases with height. This reverses the typical height fog effect: The fog gathers at the ceiling instead of the ground.

To avoid numerical problems, the absolute value of HeightFalloff should be a small value (e.g. between 0 and 10).

See Also