All parameters for pixel fog are controlled through device render states. Pixel fog supports all of the formulas introduced in Fog Formulas. Choose the formula you want the system to use by setting the D3DRENDERSTATE_FOGTABLEMODE to the desired member from the D3DFOGMODE enumerated type.
When using the linear fog formula, you set the starting and ending distances through the D3DRENDERSTATE_FOGTABLESTART and D3DRENDERSTATE_FOGTABLEEND render states. These distances are in world-space units except when using a software device, in which case distances are in device space, which ranges from 0.0 at the nearest visible point to 1.0 at the farthest visible point.
The D3DRENDERSTATE_FOGTABLEDENSITY render state controls the fog density applied when an exponential fog formula is enabled. Fog density is a essentially weighting factor, ranging from 0.0 to 1.0 (inclusive), that scales the distance value in the exponent.
As discussed in Fog Color, the D3DRENDERSTATE_FOGCOLOR render state controls what color the system uses for fog blending.