Fog Class |
Namespace: DigitalRune.Graphics
The Fog type exposes the following members.
Name | Description | |
---|---|---|
Clone |
Creates a new Fog that is a clone (deep copy) of the current instance.
| |
CloneCore |
Makes the instance a clone (deep copy) of the specified Fog.
| |
CreateInstanceCore |
When implemented in a derived class, creates a new instance of the Fog
derived class.
| |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetIntensity |
Gets the fog intensity at the specified target position.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Color0 |
Gets or sets the color of the fog at Height0.
| |
Color1 |
Gets or sets the color of the fog at Height1.
| |
Density |
Gets or sets the density of the fog at a height of 0.
| |
Density0 |
Gets or sets the density of the fog at Height0.
| |
Density1 |
Gets or sets the density of the fog at Height1.
| |
End |
Gets or sets the distance from the camera where the fog reaches its full intensity.
| |
Height0 | ||
Height1 | ||
HeightFalloff |
Gets or sets the height falloff.
| |
Name |
Gets or sets the name of the fog.
| |
ScatteringSymmetry |
Gets or sets the scattering symmetry constant.
| |
Start |
Gets or sets the distance from the camera where the fog starts.
|
Fog can be used to define a height-based fog where the fog density increases/decreases with height. Height-based fog can be used to create thick layer of fog in a valley or on a dungeon floor. The fog is relative to the PoseWorld of a FogNode. That means, the height fog moves up/down when the FogNode moves up/down.
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 HeightFalloff determines 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.
To disable the fog, simply set Density to 0. To create a height-independent fog, set HeightFalloff to 0.
The fog color can be specified using Color0 and Color1, where Color0 defines the fog color at a height of Height0, and Color1 defines the fog color at a height of Height1. Colors between Height0 and Height1 are interpolated.
The fog colors, Color0 and Color1, use premultiplied alpha. The alpha value is usually 1, but lower values can be used to reduce the overall fog intensity.
The properties Start and End define a ramp over which the fog fades in.