On 6/9/06, Stefan Dösinger stefan@codeweavers.com wrote:
This patch corrects a few issues with fog on transformed vertices, and non-pixel-non-vertex fog.
If WINED3DRS_FOGENABLE is TRUE, but WINED3RS_FOGVERTEXMODE and WINED3DRS_FOGTABLEMODE are D3DFOG_NONE, then, according to the msdn, the alpha channel specular color vertex color contains a pre-calculated fog value. The same applied to transformed vertices if Vertexfog is enabled. This patch uses glFogCoord to pass it to GL if GL_EXT_fog_coord is supported, and disables GL fog if it isn't to minimize rendering issues.
This patch makes Swat3 and Battlezone 2 happy, and the fog in Prince of Persia 3D looks more correct now. I hoped that patch might solve the disappearing objects problem in Half-Life 2, but unfortunately it doesn't, this seems not to be fog-related :-(
ChangeLog: Stefan Dösinger(for CodeWeavers): Fog fixes
This patch doesn't work with the latest fglrx saying missing symbol for glFogCoordf. Mesa is ok though.
Jesse
On 09/06/06, Jesse Allen the3dfxdude@gmail.com wrote:
This patch doesn't work with the latest fglrx saying missing symbol for glFogCoordf. Mesa is ok though.
Indeed, the patch should add the proper definitions to wined3d_gl.h and use GL_EXTCALL().