-
Notifications
You must be signed in to change notification settings - Fork 0
Description
In the ship dealer preview window, there is a rendering bug that causes some surfaces of the ship to render with a dark-blue tint.
Model in ship dealer preview window with some surfaces having a dark tint:

This dark tint happens because the ship preview window is rendering garbage data. I was unable to figure out what causes this under the hood because the FL beta renders this window in a similar fashion, but it doesn't suffer from this bug. Eventually I managed to make the discovery that wiping out the call that sets the culling mode to none fixes the bug. After that I talked to Schmackbolzen and we figured out that using the depth test D3DCMP_LESS instead of D3DCMP_LESSEQUAL fixed the problem for the most part too, besides a couple of surfaces that still render incorrectly.
freelancer.exe, 1845A7, 04 -> 02 = use D3DCMP_LESS in ship dealer preview
freelancer.exe, 19E333, 99 -> 96 = wipe out call for setting culling mode to none (volatile approach, use only for testing)
My suggestion is to hook the ship rendering function and set the culling mode to anything other than none while the ship is being rendered. Though this will certainly conflict with #11 because this feature requires the exact same function to be hooked. The problem with this is that I want these to be two separate features that can be disabled independently via the config file in the event that there are issues.
