protonscr

[d3d11] Halo: The Master Chief Collection - Shadow dithering in Halo: Reach

dxvkclosed d3d11
doitsujin/dxvk#3341 · opened 2023-04-08 by TacoDeBoss · updated 2024-06-13 · 11 comments · github
TTacoDeBoss 2023-04-08 github

When playing Halo: Reach in The Master Chief Collection, you may notice a shadow dithering/banding artifact which appears mostly in one triangle in the top left area of the screen. (Imagine a viewport split into two tris, the artifact is primarily present on the left one.)

This problem reproduces on radv and amdvlk, and also Nvidia on Windows, though the dithering artifact is not limited to one triangle there.

Interestingly, or perhaps disconcertingly, the issue does not reproduce with a single apitrace. When launching the game with DXVK, the issue will always manifest. When launching it with native Nvidia Windows drivers, the issue will never manifest, even when replaying a recorded trace with DXVK.

System information

  • GPU: RX 5700 XT, GTX 1070, Steam Deck Van Gogh
  • Driver: Mesa 23.0.1, amdvlk 2022.Q4.4-3, Nvidia Windows 531.29
  • Wine version: Proton Experimental
  • DXVK version: 2.1, 1.10.3, 1.5, 1.0, 0.63

Pictured: A comparison between Nvidia Windows (left) and DXVK on Linux (right). You may need to zoom in to view the banding.
comparison

Apitrace file(s)

  • mcc-reach-shadows.tar.zst
    Inside, you will find two traces, mcc-reach-badshadows.trace (captured on Linux with DXVK) and mcc-reach-goodshadows.trace (captured on Windows with Nvidia native drivers).

Please let me know if I can provide any more information.

Ddoitsujin maintainer 2023-04-08 github

sounds like depth bias memes at a first glance since D24S8 isn't natively supoorted on any AMD Vulkan driver, not really a bug and also not something we can reliably address in any way.

TTacoDeBoss 2023-04-08 github

sounds like depth bias memes at a first glance since D24S8 isn't natively supoorted on any AMD Vulkan driver, not really a bug and also not something we can reliably address in any way.

Not that I would know either way, but the bug also happening on Nvidia (GTX 1070 & 1080) would suggest to me that that isn't quite the case 🐸

Ddoitsujin maintainer 2023-04-08 github

Depth bias is somewhat hardware- and driver-dependent either way so I don't really see why it wouldn't be just that. Shadow acne exactly like this has been a very common issue for us in D3D9 games, among other D3D9-specific problems related to depth bias.

Not like DXVK randomly decides to make some of your pixels dark for no reason, it's happening because the math being done on shadow maps essentially results in "oh there's a shadow here".

I guess we could add a workaround to multiply depth bias values by some factor for now which would default to 1.

TTacoDeBoss 2023-04-08 github

Depth bias is somewhat hardware- and driver-dependent either way so I don't really see why it wouldn't be just that. Shadow acne exactly like this has been a very common issue for us in D3D9 games, among other D3D9-specific problems related to depth bias.

Not like DXVK randomly decides to make some of your pixels dark for no reason, it's happening because the math being done on shadow maps essentially results in "oh there's a shadow here".

I guess we could add a workaround to multiply depth bias values by some factor for now which would default to 1.

I see. I'm not fully sure I understand the correlation though...? MCC is a D3D11 game, so my assumption is that other depth bias problems seen on D3D9 wouldn't really matter here, or else I would've made the issue differently. Obviously though, I don't even know enough to know what I don't know 😁

KK0bin maintainer 2023-04-08 github

@TacoDeBoss

All he was saying is that it's a common problem for D3D9 games. (#2892)

BBlisto91 2023-06-19 github

I checked this ingame on Linux and i see the same lines with wined3d. Tested with a 7900xtx

BBlisto91 2023-06-19 github

Spoofing Nvidia seems to rid the original issue. But can instead introduce a different pattern on slopes depending on angle. Atleast the one in this map

Screenshot

image

It's easier to see when moving ingame as it kind follows the right side of the screen on this slope.
Will check Windows here later

Mmbriar 2023-06-19 github

I guess the new EXT_depth_bias_control doesn't help here, since it's apparently depth bias related?

KK0bin maintainer 2023-06-19 github

@mbriar No, it doesn't. That's what prompted Bistos investigation.

BBlisto91 2023-06-21 github

Verified on Windows the wall issue is not present with the native game but appears with dxvk. And the slope floor issue also when spoofing to nvidia with dxvk.

Tho i noticed the native game itself had a single (or dual?) line on the floor a distance ahead of the player moving along with me. Semi cursed game with all of these small things hehe.
Even tho unrelated to dxvk here is video showing it https://drive.proton.me/urls/X69JS4S6GR#S4gbyGG8BnkM

TTacoDeBoss 2024-06-13 github

Tho i noticed the native game itself had a single (or dual?) line on the floor a distance ahead of the player moving along with me. Semi cursed game with all of these small things hehe. Even tho unrelated to dxvk here is video showing it https://drive.proton.me/urls/X69JS4S6GR#S4gbyGG8BnkM

After re-investigating this game for a YouTube video, I found some Windows users exhibiting the same issue shown in your footage here, and reproduced this exact artifact when forcing an Nvidia PCI ID in a modern build of DXVK, among others.

The shadow issue that remains is more or less certainly a game bug based on what I discovered, and I even found and documented a workaround, so I'm going to go ahead and close the issue. Thanks!

Proton versions