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

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

Open
Lexpartizan opened this issue Apr 22, 2023 · 6 comments
Open

Comments

@Lexpartizan
Copy link

Lexpartizan commented Apr 22, 2023

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

@Calinou
Copy link
Member

Calinou commented Apr 22, 2023

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.

@clayjohn
Copy link
Member

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.

@Zireael07
Copy link
Contributor

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

@Calinou
Copy link
Member

Calinou commented Apr 22, 2023

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.

@Breush
Copy link
Contributor

Breush commented Aug 23, 2024

Been playing around, and removing all lowp keywords from the shaders resolves the issue.

@Calinou
Copy link
Member

Calinou commented Aug 25, 2024

Been playing around, and removing all lowp keywords from the shaders solves the issue.

That's strange, since lowp and mediump are normally ignored on desktop platforms. However, NVIDIA Turing and later GPUs support native FP16 compute (half-precision float), so maybe NVIDIA decided to make lowp and mediump effective on desktop…

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

No branches or pull requests

5 participants