Platform SDK: DirectX

CONST_D3DRENDERSTATESINGLE

The CONST_D3DRENDERSTATESINGLE enumeration defines device render states that are set and retrieved through the Direct3DDevice7.SetRenderStateSingle and Direct3DDevice7.GetRenderStateSingle methods.

Type CONST_D3DRENDERSTATESINGLE
    D3DRENDERSTATE_FOGDENSITY = 38  
    D3DRENDERSTATE_FOGEND     = 37  
    D3DRENDERSTATE_FOGSTART   = 36  
End Type
D3DRENDERSTATE_FOGDENSITY
Fog density for pixel or vertex fog to be used in the exponential fog modes (D3DFOG_EXP and D3DFOG_EXP2). Valid density values range from 0.0 to 1.0, inclusive. The default value is 1.0. For more information, see Fog Parameters.
D3DRENDERSTATE_FOGEND and D3DRENDERSTATE_FOGSTART
Depth at which pixel or vertex fog effects begin and end for linear fog mode. Depth is specified in world space for vertex fog, and either device space [0.0, 1.0] or world space for pixel fog. For pixel fog, these values are in device space when the system uses z for fog calculations, and world-space when the system is using eye-relative fog ("w-fog"). For more information, see Fog Parameters and Eye-Relative vs. Z-Based Depth.

These render states enable you to exclude fog effects for positions close to the camera. When using z-based pixel fog, for example, you could set the starting depth to 0.3 to prevent fog effects for depths between 0.0 and 0.299, and the ending depth to 0.7 to prevent additional fog effects for depths between 0.701 and 1.0.

See Also

Direct3DDevice7.SetRenderStateSingle, Direct3DDevice7.GetRenderStateSingle