<fog> ‐ A fog effect
This element defines a fog effect for the current scene. The integer value of the type attribute is equal to 1 in the case of a constant fog and is equal to 2 in the case of a ground fog.
The float value of the fade_distance attribute defines the fog opacity with respect to distance. The float values of the filter and transmit attributes specify respectively the amount of filtered transparency of the fog and the amount of non-filtered light that is transmitted through the fog.
This element can have one element in its scope: a color that defines the color of the fog.
The following element can occur in fog: one color element.
The example below defines a light blue constant fog. The fog contributes to 50% of the colors and is slightly opaque (it transmits 80% of non-filtered light).
<fog id="light_fog" type="1" fade_distance="45" filter="0.5" transmit="0.8"> <color id="fog_color" r="0.5" g="0.58" b="0.7"/> </fog>