godotengine/godot

Noise in shaders does not work correctly on new NVIDIA graphics cards.

Lexpartizan opened this issue · 4 comments

Godot version

4,02 stable

System information

Windows 10, GTX 1050, forward+

Issue description

I am working on a sky shader and everything works correctly on my computer with an old video card. However, users of the new series of video cards (4070 like) complain that the shader does not work. It was found out that it is the noise function that does not work correctly. Moreover, I used fundamentally different noise functions, but all of them not work.

I get this correct result from the noise.
image
But users of new video cards get this.
image

Everything is complicated by the fact that I do not have a modern video card for tests. And since everything works for me, I can't figure out the reason.

It's very similar to this error #67150,
BUT I don't use the sin function in noise.

Steps to reproduce

There are two types of noise - texture-based and procedural. Both work correctly on older video cards. And both don't work on the new ones. For procedural noise, just uncomment the last line in the shader.

Minimal reproduction project

noise glitch.zip

I can confirm this on 4.0.2.stable (Linux, GeForce RTX 4090 with NVIDIA 530.41.03):

image

This is a bug in the NVIDIA driver. However, given this comment, it's unlikely NVIDIA will fix it anytime soon. I suggest creating a documentation page with common hardware-specific gotchas instead.

If you can build the Direct3D 12 PR, it's worth checking whether the issue occurs when using Direct3D 12.

In addition to Calinou's answer, unfortunately with these types of issues there isn't much we can do. We don't have any meaningful control over the shader compiler, it's all in the GPU's driver.

Can the driver bug be documented somewhere? As more people buy those cards, more people will be exposed to the problem

Can the driver bug be documented somewhere? As more people buy those cards, more people will be exposed to the problem

This is what I mentioned above.