Thanks very much Reimar! I have dual NVidia GeForce 9800GT's and was having a clipping problem-- if backdrop was on, whenever the view was pointed toward a backdrop image all the foreground graphics would disappear (cockpit window frame, hanger deck, etc). Even with backdrop turned off there was a problem because apparently there are still some backdrop type objects that remain (like the star for the system I was at in my test mission) that would clip the foreground away when you pointed at them.Reimar wrote:Ok, that was a horrible experience but I have a solution for ATI cards. I doubt it helps the NVidia users out there though.
I have to wonder what compiler they used for XWA, the code is horribly inefficient, a simple recompile with a modern compiler would probably halve the size of the binary.
Anyway, the issue was indeed due to the Z-Buffer, and it is a ATI driver bug: the IDirectDrawSurface::Blt funtion is broken when used on the Z-Buffer with DDBLT_DEPTHFILL, somehow the Z-Buffer gets only partially filled. If you have more confidence in ATI's software department than I do I'd recommend to send them a bug report.
The solution is to use instead the Direct3D7 function IDirect3DViewPort::Clear2 function.
Note that XWA only requests (I think) Direct3D 1, so if you are unlucky it might just crash on some Windows versions, but it worked for me on Windows XP x64.
To use ViewPort::Clear2 to clear Z-Buffer you have to make these changes to the xwingalliance.exe (tested with 2.02):
at offset 0x1973ce (0x597fce in memory):
Pattern from: c7 45 ec ff ff 00 00
to: c7 45 ec 00 00 80 3f
at offset 0x197410 (0x598010 in memory):
Pattern from: 50 68 00 00 00 03 6a 00 6a 00 8d 4d 88 51 8b 15 a4 e7 b0 00 52 a1 a4 e7 b0 00 8b 08 ff 51 14
to: 90 6a 00 ff 75 ec 6a 00 6a 02 8d 4d 88 51 90 90 90 90 6a 01 a1 bc 15 7b 00 50 8b 08 ff 51 50
I tried everything I could think of-- turned all AA off, Mip mapping, cranked the NVidia card options all off for xwingalliance.exe... (v2.02)... but nothing helped.
So on the outside chance your fix to switch the D3D function would help, I tried it. The hex change was the magic bullet... the game seems to be working like it used to on my older PC. You are a wizard, Thanks again!
Running XP Professional Version 2002 - Service Pack 3, with Direct X 9.0c