protonscr

[d3d9] Warhammer 40,000: Space Marine Graphical Corruption when forcing Anisotropic Filtering

dxvkclosed not a bug
doitsujin/dxvk#5172 · opened 2025-08-25 by ShinChaosBahamut · updated 2025-09-01 · 8 comments · github
SShinChaosBahamut 2025-08-25 github

Noticed while playing Space Marine that if I force Anisotropic Filtering via dxvk.conf the screen will be "garbled" with green noisy artifacts. (as shown in the attached image)

Image

Setting the Post Process FX setting (which also controls post process AA; which I think might be the cause of this, sadly there's no way to disable JUST the AA part of the setting to confirm) to Off works around this issue, but I figured I'd bring it up just in case a fix is possible.

OS: Windows 11
DXVK version: 2.7 (also tried the build provided in https://github.com/doitsujin/dxvk/issues/5134#issuecomment-3169243085 just to see if that already fixed it; no dice)

WWinterSnowfall 2025-08-25 github

The game is already using varying levels of anisotropy, from 4x to 8x... why do you feel you need to override that? Forcing a certain global level, although usually fine, is known to break games at times. This is one such case, where the game was designed around various expected levels on certain textures, and will break otherwise.

Ddoitsujin maintainer 2025-08-25 github

Forcing anisotropy is known to break passes that rely on bilinear filtering, overriding game behaviour isn't epxected to work in all cases.

SShinChaosBahamut 2025-08-25 github

The game is already using varying levels of anisotropy, from 4x to 8x...

In my defense, I did not know that. (experience has kinda taught me that if a relatively older game does not have AF settings, it's using just basic Bilinear/Trilinear Filtering)

Since this ain't a bug I'll just close this.

WWinterSnowfall 2025-08-25 github

In my defense, I did not know that. (experience has kinda taught me that if a relatively older game does not have AF settings, it's using just basic Bilinear/Trilinear Filtering)

Believe you me you will know when a game only uses bi/trilinear. For example the original Mafia looks awful if you don't force some form of AF. Everything more than 10m away gradually turns into texture barf.

SShinChaosBahamut 2025-08-26 github

Well, might as well ask since this is up (even though closed); any reason why forcing AF via DXVK.conf would have this issue but forcing AF via the drivers (when using the native API) wouldn't? No snark intended, I'm genuinely curious.

WWinterSnowfall 2025-08-26 github

Drivers have more advanced heuristics and although you force a certain level they will at times skip applying it on a case by case basis. In short, they will sometimes ignore the override level you are setting to ensure it doesn't interfere with rendering.

Our implementation is (at least in d3d9), as the description says, a basic override on all samplers that use anything other than point filtering. I don't think anyone is willing to make it any more complex, as it works fine most of the time.

WWinterSnowfall 2025-09-01 github

@ShinChaosBahamut Good news, looks like our "heuristics" can be tuned a bit, enough to fix the issue with the game at least. Feel free to try out the PR: https://github.com/doitsujin/dxvk/actions/runs/17382736506/artifacts/3899899361

SShinChaosBahamut 2025-09-01 github

That did it. :)

Upstream links