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

Saints Row 2 dynamic lighting shadows glitching #1814

Closed
lgtzu opened this issue Nov 12, 2020 · 8 comments · Fixed by #2957
Closed

Saints Row 2 dynamic lighting shadows glitching #1814

lgtzu opened this issue Nov 12, 2020 · 8 comments · Fixed by #2957
Labels

Comments

@lgtzu
Copy link

lgtzu commented Nov 12, 2020

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

@doitsujin
Copy link
Owner

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.

@lgtzu
Copy link
Author

lgtzu commented Nov 12, 2020

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.

@Blisto91
Copy link
Contributor

Blisto91 commented Jul 4, 2022

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.

@ivan89el
Copy link

The problem is still present in the version 1.10.2

@K0bin
Copy link
Collaborator

K0bin commented Jul 27, 2022

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.

@ivan89el
Copy link

ivan89el commented Aug 1, 2022

@K0bin #2417 (comment)

@K0bin
Copy link
Collaborator

K0bin commented Sep 5, 2022

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

@K0bin
Copy link
Collaborator

K0bin commented Sep 19, 2022

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

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

Successfully merging a pull request may close this issue.

5 participants