D3DFOGMODE

The D3DFOGMODE enumerated type contains constants describing the fog mode. These values are used by the D3DRENDERSTATE_FOGTABLEMODE render state in the D3DRENDERSTATETYPE enumerated type.

typedef enum _D3DFOGMODE {

D3DFOG_NONE = 0,

D3DFOG_EXP = 1,

D3DFOG_EXP2 = 2,

D3DFOG_LINEAR = 3

D3DFOG_FORCE_DWORD = 0x7fffffff,

} D3DFOGMODE;

Members

D3DFOG_NONE

No fog effect.

D3DFOG_EXP

The fog effect intensifies exponentially, according to the following formula:

D3DFOG_EXP2

The fog effect intensifies exponentially with the square of the distance, according to the following formula:

D3DFOG_LINEAR

The fog effect intensifies linearly between the start and end points, according to the following formula:

This is the only fog mode currently supported.

D3DFOG_FORCE_DWORD

Forces this enumerated type to be 32 bits in size.

Remarks

In monochromatic (ramp) lighting mode, fog works properly only when the fog color is black. (If there is no lighting, any fog color will work, since in this case any fog color is effectively black.)

For more information about fog, see Colors and Fog.

Note  Fog can be considered a measure of visibility¾the lower the fog value produced by one of the fog equations, the less visible an object is.

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in d3dtypes.h.