Fog effects can give a 3-D scene greater realism. Fog effects can be used for more than simulating fog. They can also be used to decrease the clarity of a scene with distance. This mirrors what happens in the real world. As objects get more distant from the viewer, their detail becomes less distinct. For more information about using fog in your application, see Fog.
The current Direct3D device enables and disables fog blending, controls fog color, and manipulates some fog parameters. You can enable fog by setting the D3DRENDERSTATE_FOGENABLE render state to TRUE. The fog color can be set to any D3DCOLOR value (the alpha component of the fog color is ignored). See D3DRENDERSTATE_FOGCOLOR.
For general information about using fog, see Fog, in the Common Techniques and Special Effects section.