doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
12.95k stars 832 forks source link

[d3d11, regression] Max Payne 3 LOD Fade Breaks After d66f838 #4072

Closed TacoDeBoss closed 3 months ago

TacoDeBoss commented 3 months ago

Max Payne 3 (204100)

In Max Payne 3, LODs of distant objects will fade from invisible when the player gets close. After commit d66f838, this effect is not being rendered, and the LODs simply pop-in.

It may be worth noting that on native d3d11 (AMD Adrenalin 24.5.1, Windows 11 23H2) the LODs fade in with a dithered pattern, whereas with the last good DXVK commit, the fade effect happens with a "proper" transparent effect instead, as seen in the bottom video below. I'd consider this behavior to be for the best, since it looks much better.

After trying for a few hours, I was unable to capture an apitrace on Linux or Windows, it simply causes the game to crash immediately. Let me know if I can get something useful for you any other way.

System information

master branch at 018db92

https://github.com/doitsujin/dxvk/assets/2870898/a4c6ba88-886e-4151-90d1-ad3a75faed72

last good at 007e9f4

https://github.com/doitsujin/dxvk/assets/2870898/c06cd12b-dbe6-4d51-9418-2b43a4c365c2

doitsujin commented 3 months ago

Is this with any sort of MSAA enabled, and what's the fastest possible way to repro this?

DXVK behaviour before d66f8385c38abc73c6b4f69a510282334f3faadf is both undefined in Vulkan and incorrect for D3D11 as documented in the respective specs, I don't know why this would break stuff.

doitsujin commented 3 months ago

So far I haven't been able to reproduce this, but that's probably because the missions in the beginning of the game don't really make use of LODs in the first place. Is there any way to get to the point in the video that doesn't involve playing this for 10+ hours? This game is already annoying the absolute living shit out of me and I really don't want to have to deal with this more than absolutely necessary.

TacoDeBoss commented 3 months ago

After further testing, it seems that commit d66f838 actually matches native d3d11 behavior, as I was mistakenly testing with MSAA off. Thank you for your time.