## Main sections

## X_FOG

### X_FOG color#, exp_mode#, par1#, par2#

Activates fog. Fog can be one of two types - linear (the fog is a fixed start and end distance from the camera) or exponential (the camera is in the middle of the fog.) Exponential fog looks more like real fog but takes more CPU power.

If color#=-1, it turns off the fog.

The switch exp_mode# decide whether to use linear fog (exp_mode#=FALSE) or exponential fog (exp_mode#=TRUE).

The parameters par1# and par2# depend on exp_mode#:

exp_mode# = TRUE: (exponential fog)

par1 = Density of the fog - Value from 0 to 1

par2 = Ignored

exp_mode# = FALSE: (linear fog)

par1 = zNear - Begin of the fog (distance from camera)

par2 = zFar - End of the fog

If par1=0 and par2=0, the zNear and zFar values of the current camera will be used.