protonscr

Dead Space Remake - NaN lines on glass in Hydroponics area

vkd3dclosed
HansKristian-Work/vkd3d-proton#2530 · opened 2025-06-27 by K0bin · updated 2025-07-03 · 2 comments · github
KK0bin 2025-06-27 github

Image

The glass on the walls shows those thin black lines. Those do not appear on Windows. Looking at it with Renderdoc, the lines are (NaN, NaN, NaN, 1.0).

Software information

Dead Space Remake, highest settings except that SSAO instead of RTAO.

System information

  • GPU: Nvidia RTX 3090
  • Driver: 575.64.0
  • Wine version: Proton Experimental BE as of the 27th of June
  • VKD3D-Proton version: 2b9f7cae1f7d4eae3d2d33a1a27d42d7a1a0b86e

Log files

Can provide those later but to be honest, I don't think they're particularly useful.

Save file

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

It needs to go into %PREFIX%/drive_c/Users/steamuser/Documents/Dead Space (2023).

I do not know whether save files are encrypted or linked to the account in any way.

Steps to reproduce

Unfortunately you have to walk a bit.

  • Make sure the graphics settings match mine. I haven't checked whether it happens at lower settings too.
  • Load my save file (the one in Hydroponics)
  • Take the door to the left
  • Follow the linear path until you reach a huge room with an elevator in the middle
  • Go up that elevator
  • Turn around 180° and go through that door
  • Follow the path until you enter another huge room (The room is very foggy and will be announced by "Entering zero gravity")
  • Look at the wall to your right and you should see the issue.

Dumped shaders

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

Disassembled DXBC:
https://drive.google.com/file/d/1QDdFzJu5RwvsHMZ-y_vdWQDLHr8cyh3E/view?usp=sharing

SPIR-V:
https://drive.google.com/file/d/1edc_DeRNVQistLeCkvyg8ksHpM97h6Na/view?usp=sharing

Renderdoc capture

Renderdoc capture

Recorded on the hardware + driver combination listed above.
The problematic draw appears to be EID 38331. The problematic shader is a fragment shader with the hash 8b981fdafe14b649.

KK0bin 2025-06-28 github

@Sid127 tried reproducing the problem.

She was able to reproduce it on the proprietary Nvidia driver:

Image

She was also able to reproduce it on NVK. (high settings, FSR2 quality).

Image

Image

Image

KK0bin 2025-06-29 github

Pretty sure this is a case of derivatives in non-uniform control flow.

There's roughly this code in the shader in some if-clause:

                    vec3 _23127 = dFdxCoarse(v2.xyz);
                    r6 = vec4(_23127.x, _23127.y, _23127.z, r6.w);
                        r1.w = dot(r6.xyz, r6.xyz);
                        r1.w = inversesqrt(r1.w);

r6 ends up being 0,0,0 so the inverse sqrt returns NaN. Manually hoisting the derivative call to the beginning of the shader (trivial here because it operates on a pixel shader input) fixes the issue.

Proton versions