dxvk icon indicating copy to clipboard operation
dxvk copied to clipboard

Saints Row 2 dynamic lighting shadows glitching

Open lgtzu opened this issue 3 years ago • 8 comments

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

lgtzu avatar Nov 12 '20 13:11 lgtzu

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.

doitsujin avatar Nov 12 '20 14:11 doitsujin

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.

lgtzu avatar Nov 12 '20 14:11 lgtzu

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.

Blisto91 avatar Jul 04 '22 17:07 Blisto91

The problem is still present in the version 1.10.2

ivan89el avatar Jul 27 '22 10:07 ivan89el

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.

K0bin avatar Jul 27 '22 10:07 K0bin

@K0bin https://github.com/doitsujin/dxvk/issues/2417#issuecomment-1145601491

ivan89el avatar Aug 01 '22 17:08 ivan89el

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

K0bin avatar Sep 05 '22 14:09 K0bin

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

K0bin avatar Sep 19 '22 18:09 K0bin