Microsoft DirectX 8.0 (C++) |
Fog color for both pixel and vertex fog is set through the D3DRS_FOGCOLOR render state. The render state values can be any RGB color, specified as an RGBA color; the alpha component is ignored.
The following C++ example sets the fog color to white.
/* For this example, the d3dDevice variable is * a valid pointer to an IDirect3DDevice8 interface. */ HRESULT hr; hr = d3dDevice->SetRenderState( D3DRS_FOGCOLOR, 0x00FFFFFF); // Highest 8 bits are not used. if(FAILED(hr)) return hr;