About Vertex Fog

When the system performs vertex fogging, it applies fog calculations at each vertex in a polygon, then interpolates the results across the face of the polygon during rasterization. Unlike pixel fog, vertex fog only supports the linear fog formula (D3DFOG_LINEAR). Because vertex fog effects are computed by the Direct3D lighting and transformation engine, most vertex fog parameters are exposed in the device lighting states set through the IDirect3DDevice3::SetLightState method. For more information, see Vertex Fog Parameters.

If your applications doesn't use Direct3D for transformation and lighting, it must perform fog calculations on its own. In this case, your application can place the fog factor it computes in the alpha component of the specular color for each vertex. You are free to use whatever formulas you desire—range-based or otherwise. Direct3D uses the supplied fog factor to interpolate across the face of each polygon. Applications that do not use Direct3D transformation and lighting need not set vertex fog parameters through light states, but must still enable fog and set the fog color through the associated render states. For more information, see Vertex Fog Parameters.