Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TacoDeBoss opened this issue Apr 8, 2023 · 11 comments
Closed
Labels

Comments

@TacoDeBoss
Copy link
Contributor

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.

@K0bin K0bin added the d3d11 label Apr 8, 2023
@doitsujin
Copy link
Owner

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.

@TacoDeBoss
Copy link
Contributor Author

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 🐸

@doitsujin
Copy link
Owner

doitsujin commented Apr 8, 2023

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.

@TacoDeBoss
Copy link
Contributor Author

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 😁

@K0bin
Copy link
Collaborator

K0bin commented Apr 8, 2023

@TacoDeBoss

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

@Blisto91
Copy link
Contributor

Blisto91 commented Jun 19, 2023

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

@Blisto91
Copy link
Contributor

Blisto91 commented Jun 19, 2023

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

@mbriar
Copy link
Contributor

mbriar commented Jun 19, 2023

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

@K0bin
Copy link
Collaborator

K0bin commented Jun 19, 2023

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

@Blisto91
Copy link
Contributor

Blisto91 commented Jun 21, 2023

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

@TacoDeBoss
Copy link
Contributor Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants