OK, I've been trying out some fog - I tried the following simple code:
d3ddev->SetRenderState(D3DRS_FOGENABLE, true); //Enable fog
d3ddev->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_XRGB(255, 255, 255)); //Make the fog white
d3ddev->SetRenderState(D3DRS_FOGTABLEMODE, D3DFOG_LINEAR); //Set simple linear pixel fog
d3ddev->SetRenderState(D3DRS_FOGSTART,*(DWORD*)(&fogStart)); //Fog starts here
d3ddev->SetRenderState(D3DRS_FOGEND,*(DWORD*)(&fogEnd)); //Fog ends here
fogStart is 20.0f and fogEnd is 60.0f. It looks pretty decent when I look out towards the horizon, but it also renders fog in every other direction too - I can also see it in the corners of the skybox and over my head. Is there a simple way to constrain it to the horizon only?
Thanks!