Share via


D3DMFOGMODE

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This enumeration provides values that identify fog equations used in various render states. Both vertex and pixel fog modes support all of these fog equations.

Syntax

typedef enum _D3DMFOGMODE {
  D3DMFOG_NONE        = 0,
  D3DMFOG_EXP         = 1,
  D3DMFOG_EXP2        = 2,
  D3DMFOG_LINEAR      = 3,
  D3DMFOG_FORCE_ULONG = 0x7fffffff,
} D3DMFOGMODE;

Elements

  • D3DMFOG_NONE
    Identifies that fogging modes are disabled.
  • D3DMFOG_EXP
    Identifies a fog model where the fog effect, F, intensifies according to the following equation.

    F = 1/e^(d*density)
    

    In this equation, e is the base of the natural logarithm, and d is distance. The value for density is the value of the D3DMRS_FOGDENSITY render state. For more information, see D3DMRENDERSTATETYPE.

  • D3DMFOG_EXP2
    Identifies a fog model where the fog effect, F, intensifies according to the following equation.

    F = 1/e^(d*density)<SUP>2</SUP>
    
  • D3DMFOG_LINEAR
    Identifies a fog model where the fog effect, F, intensifies linearly between the start and end points according to the following equation.

    F = (end - d)/(end - start)
    

    The values for start and end are the values of the D3DMRS_FOGSTART and D3DMRS_FOGEND render states.

  • D3DMFOG_FORCE_ULONG
    Forces the compiler to interpret the enumeration as a ULONG value. This value is not used directly in Direct3D Mobile programming.

Requirements

Header d3dmtypes.h
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

Direct3D Mobile Enumerations
D3DMRENDERSTATETYPE