protonscr

Saints Row 2 dynamic lighting shadows glitching

dxvkclosed d3d9
doitsujin/dxvk#1814 · opened 2020-11-12 by lgtzu · updated 2022-09-26 · 8 comments · github
Llgtzu 2020-11-12 github

Shadows glitch in Saints Row 2 when you have dynamic lighting option on "Full" or "Simple". The shadows start glitching when you move your camera to certain positions. DXVK otherwise runs the game so much better than with native DX9 so it's kind of necessity to use it to play SR2 on my system because of the bad PC port.

Software information

Windows 10 Pro 2009 (Also happens with Proton)
Saints Row 2 DX9 with DXVK
Dynamic Lighting set to "Full". (Without dynamic lighting shadows don't glitch, because it removes almost all shadows.)

Here is GIF where you can see the shadows glitching:
https://imgur.com/a/QJSxGAL

System information

  • GPU: AMD Radeon RX 5700 XT
  • Driver: Radeon Software 20.9.1 Windows (also tested with AMDGPU + ACO on Linux)
  • Wine version: Using Windows but also happens on Wine
  • DXVK version: 1.7.2

Apitrace file(s)

For some reason with apitrace on, the shadows don't glitch. Also normally with DXVK on Windows, the steam overlay doesn't work but with the apitrace dlls it works and the game lags much more (may be because of the logging.). So I don't know what's the problem because I also used the correct 32-bit apitrace.

I've heard that many others have this issue at least with AMD cards with DXVK on both Windows and Linux, so if someone gets the issue reproduced with apitrace on should send the files if they want to help.

Log files

Ddoitsujin maintainer 2020-11-12 github

For some reason with apitrace on, the shadows don't glitch

because with apitrace (at least on Windows) you'll be using the native D3D9 driver for rendering and not DXVK.

Please record and upload a trace so we can actually investigate the problem.

Llgtzu 2020-11-12 github

Please record and upload a trace so we can actually investigate the problem.

I got you.

So here are the traces from Windows so it doesn't have the glitching with the DX9 but I hope you can investigate from that:

https://drive.google.com/file/d/150x59l8gj0hN5hTjBY0F8GB5I-AP9Vgi/view?usp=sharing

https://drive.google.com/file/d/1ffgkN2a_yVkTEho7mG6di9rQXWXmKW44/view?usp=sharing

Also I might be able to record the issue on Linux later if it's needed.

BBlisto91 2022-07-04 github

This looks like it might be a amd only issue. At least i wasn't able to reproduce this on a nvidia 960 with 515 drivers when i was testing something else in the game.
Usually i can always reproduce on amd.

Iivan89el 2022-07-27 github

The problem is still present in the version 1.10.2

KK0bin maintainer 2022-07-27 github

I can't even get Saints Row 2 working on my system at all. Even without DXVK.

I've tried:

  • Linux port
  • Windows Version on Proton
  • Windows Version on Windows

It just crashes before the main menu.

KK0bin maintainer 2022-09-05 github

The game sets the depth bias, so the issue is most likely #2892.

KK0bin maintainer 2022-09-19 github

Quoting @CME42 here because this is a useful finding:

the shadows are due to missing depth clamping due to the D24->D32 fixup

Vulkan spec:

If the image being sampled has an unsigned normalized fixed-point format, then Dref is clamped to
[0,1] before the compare operation

Upstream links