My Fog of War effect is achieved by a terrain mesh which is "wrapped" on to the underlying terrain. I then edit the alpha channel of the diffuse values of each vertex in order to make the terrain more or less visible.
Here is the set up routine of the Fog of War object:
rem create fog of war
uWorld.FogOfWar.Obj = GenerateFogOfWar( StartX# , StartY# , EndX# , EndY# , ResolutionX , ResolutionY )
make mesh from object 1 , uWorld.FogOfWar.Obj
delete object uWorld.FogOfWar.Obj
make object uWorld.FogOfWar.Obj , 1 , 0
delete mesh 1
set object transparency uWorld.FogOfWar.Obj , 2
disable object zwrite uWorld.FogOfwar.Obj
disable object zdepth uWorld.FogOfWar.Obj
set object light uWorld.FogOfWar.Obj , 0
WrapObjectOnTerrain( uWorld.FogOfWar.Obj )
In particular, the transparency mode may be relevant, and the fact I disabled zwrite. I tried enabling it again which made it better, but there were still overlaps if viewed from certain angles.
My problem now is that when viewing the terrain from certain angles, the Fog of War object overlaps itself, generating much darker patches than intended. This is visible in the following screen shot:
http://forum.thegamecreators.com/xt/xt_apollo_pic.php?i=2423463
How can I fix this?
TheComet