protonscr

Shimmering clothes in Hellblade: Senua's Sacrifice

dxvkclosed game bug
doitsujin/dxvk#1159 · opened 2019-08-07 by 88i · updated 2019-10-09 · 12 comments · github
888i 2019-08-07 github

Issue description:

Please watch the fur on Senua's shoulders in this video: https://www.youtube.com/watch?v=V4a-E1oGbaU&t=41s

But when DXVK is used, this fur vibrates in a strange way: https://www.youtube.com/watch?v=Os2mbNsfjJo&t=105s

To make clear that the problem is not solved with the latest dxvk version and the latest nvidia drivers, I have made my own example video: https://drive.google.com/file/d/1udNAqZIU2s8AIvxJCa7PpES9CktHbs7O/view?usp=sharing

To view this video in original quality you must download the file. If you watch the entire video carefully, you will see that there are often problems with the appearance of the fur.

Software information
Hellblade: Senua's Sacrifice
Settings: any

System information
GPU: GTX 1050 2GB
Driver: 430.40.0
CPU: Intel i3-3240 (4) @ 3.400GHz
RAM: 3.6 GB
Wine version: wine-staging 4.12
DXVK version: 1.3.2

Log files
d3d11.log: https://paste.debian.net/1094747/
dxgi.log: https://paste.debian.net/1094748/

888i 2019-08-07 github

In the Senua's Sacrifice video you also see another bug. When I go to the settings around minute 7:41 you will see that a certain line is always selected that should not have been selected. You see the problem in this video: https://drive.google.com/file/d/1udNAqZIU2s8AIvxJCa7PpES9CktHbs7O/view?usp=sharing

And I also have a bug in The Witcher 3. When I go to a certain menu I always see two completely transparent lines in this menu. You can see the problem in this sample video: https://drive.google.com/file/d/16l0ogLJk7c8DUlUrm1oeS90mAAgEhU8F/view?usp=sharing

From this last bug I know that it is a specific nvidia problem, because I did not see these completely transparent lines in the menu when I had built a RX 570 system for a family member.

These are all three bugs that I have been experiencing for many months, during many different DXVK and wine versions.

Ddoitsujin maintainer 2019-08-07 github

Okay, looking very closely, I think I can replicate the juddering fur on my end as well - thing is, the exact same thing happens on Windows on my hardware, especially when running the game with a cold shader cache. Running DXVK without the state cache makes it more obvious.

This looks like the physics engine is extremely sensitive to even small frame time spikes, which cannot really be fixed inside DXVK unless you magically manage to eliminate all frame time spikes (we're talking about 14-19ms frame times when running with 60 Hz Vsync here, so yeah).

When I go to the settings around minute 7:41 you will see that a certain line is always selected that should not have been selected.

Again, the same thing happens on Windows. This isn't a rendering issue, if anything, this is a game bug.

When I go to a certain menu I always see two completely transparent lines in this menu.

I'll check my Nvidia system, but I don't remember seeing that problem there (might be specific to weird resolutions?). Can't reproduce on my AMD system either.

These are all three bugs that I have been experiencing for many months, during many different DXVK and wine versions.

And none of them appear to be DXVK bugs.

888i 2019-08-07 github

For me, the fur bug is very striking. Firstly, the fur moves slightly vertically up and down almost all the time. If this already happened on Windows, then it is much less clearly visible as you see in the Windows recording with a gtx pascal gpu (= same architecture as my own card). I would describe this problem as a slight vibration of the fur and it is much less clearly visible on windows if it is already visible on windows.

Then you have a second bug with the fur and that is that the coat (using dxvk) suddenly pops up eye-catching. You can see this very clearly around 1:33 in my video and at several other times. In windows I have not seen this happen, and I have watched several videos with nvidia pascal cards. For example, you don't see this happening in the first video of my post, so why does it happen in my own video?

And why do you think this bug is not related to DXVK when the problem is almost invisible on windows?

The fur also looks a bit sharper and more detailed on windows. Small details on Senua's face are also much more visible on the Windows version. And another notable difference is the gamma values, perhaps the shading or shadowing is also slightly different. The colors are also slightly different. I think the colors might be my biggest problem in Linux.

This color problem may have to do with Linux in general and not dxvk. For example, in QuickTime colors display (almost) perfectly how it should be done. But in MPV you see, for example, that the colors are not only darker in MPV, they are also technically incorrect.

About the selection problem in the menu. I cannot find any Windows bug reports that are being complained about here. You can be right but I can't find any evidence.

Then about The Witcher 3 bug. My resolution is officially supported by the game and was the most popular resolution not so long ago. It was the most popular resolution for 17 ″ and 19 ″ monitors around 2009. And The Witcher 3 was released in 2015 so it seems logical that this resolution has perfect support.

The bug also seems not to be present in Windows: https://www.youtube.com/watch?v=b1fuDvozlTk&t=112s

I also want to say clearly that I greatly appreciate your work and that I just want to help improve the project.

Ddoitsujin maintainer 2019-08-07 github

And why do you think this bug is not related to DXVK when the problem is almost invisible on windows?

Because, like I just said, the problem does exist on Windows and is about as noticeable there as it is with DXVK on my system unless I deliberately run DXVK without the state cache enabled (which makes hitching more common due to shader compilation). This isn't a bug at all, it's just how the physics simulation in this game works.

I'm sorry that DXVK cannot provide perfect frame times on your system, but you cannot really expect it to deliver the same experience as Windows does on much stronger hardware.

About the selection problem in the menu. I cannot find any Windows bug reports that are being complained about here. You can be right but I can't find any evidence.

It's trivial to reproduce: Start the game on Windows and open the menu. :man_shrugging: I literally just did that.

I also don't see how a D3D11 implementation is supposed to have any impact on which menu item is selected. Again, this is not a rendering issue but a logic issue.

I also want to say clearly that I greatly appreciate your work and that I just want to help improve the project.

Well, thanks, but I can only fix bugs that are actually bugs in the project. I cannot fix game bugs in Hellblade, or their physics engine.

888i 2019-08-07 github

I have done some research and you are indeed right that the problem may be more visible on weaker hardware.

But what I think is not entirely correct:

the problem does exist on Windows and is about as noticeable there as it is with DXVK

If you go here to minute 2:13 you will see that the left side of the fur does not really vibrate in Windows: https://www.youtube.com/watch?v=LEzUK1GoJec&t=120s

But if you go here to minute 1:52, which is exactly the same moment, you see that the fur on the left shoulder vibrates more strikingly in Linux: https://drive.google.com/file/d/1udNAqZIU2s8AIvxJCa7PpES9CktHbs7O/view

And the performance of my system is + - 2 FPS higher than the performance of this windows 10 gtx 750 ti system.

So it seems that DXVK performs weaker than is possible in this specific area. If the performance of the coat cannot be improved in DXVK then this is currently a major disadvantage to DXVK. Because the GTX 1050 and GTX 1050 Ti are in second and third place in the Steam Hardware Survey. Many people will therefore have noticeable performance problems in this specific area if they use dxvk.

So it may not be a bug, but it is something that runs much worse in dxvk. And how physics simulation works in this game is not the full explanation of why it performs poorly. This simulation is currently running better on windows.

It's trivial to reproduce: Start the game on Windows and open the menu. man_shrugging I literally just did that. Again, this is not a rendering issue but a logic issue.

Ok I believe you. I do not use windows so I could not check this.

And finally I have this problem: https://drive.google.com/file/d/16l0ogLJk7c8DUlUrm1oeS90mAAgEhU8F/view

At the same resolution, it doesn't seem to be a problem on windows. So please let me know if you can reproduce it or not.

Ddoitsujin maintainer 2019-08-07 github

But what I think is not entirely correct:

Again I'm talking about my specific setup which consists of an RX 480 and Ryzen 2700X. It's working fine here, it might not work as well on other setups.

Because the GTX 1050 and GTX 1050 Ti are in second and third place in the Steam Hardware Survey. Many people will therefore have noticeable performance problems in this specific area if they use dxvk.

DXVK is known to be ~20% slower than Windows on Nvidia hardware when GPU-bound, up to 50% slower when CPU-bound, and have worse frame times. None of this is news.

And this isn't going to change. DXVK is a translation layer, it has to take detours compared to a (properly optimized) native driver, and the Vulkan drivers aren't always delivering the best possible performance either.

888i 2019-08-07 github

DXVK is known to be ~20% slower than Windows on Nvidia hardware when GPU-bound, up to 50% slower when CPU-bound, and have worse frame times. None of this is news.

Ok. So you indicated that the fur problem probably has to do with physics simulation.

Anything that can be parallelized will have a huge performance boost when done on the GPU (instead of via CPU) so I assume that physics simulation runs through the GPU?

My graphics card (GTX 1050) is between 10% and 30% faster than the GTX 750 ti depending on the game.

So the 20% performance difference between dxvk and windows 10 is largely eliminated by the difference in gpu.

That is why I thought, let's put all settings to low, then I give my gpu and dxvk much less work in the field of physics simulation and I should see fewer vibrations of the coat anyway than what I have seen in the windows 10 gtx 750 ti video.

But I still saw more vibrations from the fur on dxvk. So it looks like there is a serious loss of performance for calculating this coat, much larger than the 20% gpu difference that you specify.

Either it is a huge gpu related performance difference between dxvk and windows (much larger than 20%), or a bug. Unless I make a mistake somewhere?

Ddoitsujin maintainer 2019-08-07 github

so I assume that physics simulation runs through the GPU?

No, it doesn't. At least not in this game.

Either it is a huge gpu related performance difference between dxvk and windows (much larger than 20%), or a bug. Unless I make a mistake somewhere?

No, there is no bug, the issue is (as I have repeatedly stated now) frame time consistency, which also has very little to do with the 20% figure. I don't know why it's so much worse for you than on Windows, and to be frank, I don't really care - there's not much optimization headroom in DXVK, it won't magically improve so much that it will deliver a Windows-like experience on Nvidia-based systems.

888i 2019-08-07 github

No, there is no bug, the issue is (as I have repeatedly stated now) frame time consistency, which also has very little to do with the 20% figure.

I have looked at the frame time graph but I do not immediately see a correlation between inconsistent frame times and the vibrations of the fur. When the frame times are fairly consistent, the coat seems to vibrate just as hard.

Another thing is that I only have the problem on the water. When I step out of the water, the fur no longer vibrates. Although there are still inconsistent frame times at certain times.

These two observations seem to contradict that it has to do with the frame times. I can make a video with frametimes if this would be useful.

Or do you think the problem has too little importance to solve?

Ddoitsujin maintainer 2019-08-07 github

When the frame times are fairly consistent, the coat seems to vibrate just as hard.

Look closer then. Any ≥5ms difference between consecutive frames will cause some visible judder.

Or do you think the problem has too little importance to solve?

I've been telling you this whole time that there is no problem and there is nothing to solve.

Aartivision 2019-08-07 github

Happens to me to in FFXV on my Rx570. Even when consisted 60fps with less than 2ms difference. The cape goes up and down, the fur trembles. WineD3D doesn't do that but provides only half the framerate.

888i 2019-08-07 github

Look closer then. Any ≥5ms difference between consecutive frames will cause some visible judder.

I understand that, but again, when I get out of the water, I still have differences of ≥ 5ms. And I no longer have the problem despite having similar frame times.

So I don't think frame times fully explain the problem, but I can be wrong of course.

Take a look at this video: https://www.youtube.com/watch?v=naOAXYDUkDg&t=103s

Around 1:44 you see exactly the same thing happening, while the frame times are perfect at that time.

Around 1:19 in this video I also see a slight vibration of the fur on the left shoulder, while nothing special happens with the frame times.

Nothing extracted yet.