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

Vulkan Forward+: Visual glitch appears in the radiance map at sizes higher or lower than the default #76166

Closed
Lexpartizan opened this issue Apr 17, 2023 · 3 comments · Fixed by #95990

Comments

@Lexpartizan
Copy link

Godot version

4.02 stable

System information

windows 11, GTX 1050, forward+

Issue description

When I change the size of the radial size strange artifacts occur. If at a size of 256 the picture is expected, then at a smaller size for some reason the cubic nature of the picture becomes visible, and at a larger size incomprehensible darkened areas appear.
radial size = 32: Strange Cubic structure;
image
radial size = 64: Strange Cubic structure;
image
radial size = 128: Strange Cubic structure;
image
radial size = 256: Awesome picture;
image
radial size = 512: Strange light windows;
image
radial size = 1024: Strange light windows;
image

Steps to reproduce

Just change radial size in sky settings;

Minimal reproduction project

sky.zip

@Calinou
Copy link
Member

Calinou commented Apr 17, 2023

I can confirm this when using the Forward+ rendering method. This does not occur when using the Mobile rendering method. The sky shader fails to load when using the Compatibility rendering method.

It looks like something isn't being resized relative to the default radiance map size (256), so the square appears too large or too small depending on the chosen radiance map size.

That said, the sky shader renders incorrectly for me in the MRP (4.0.2, GeForce RTX 4090 with NVIDIA 530.41.03):1

image

Can you reproduce this when using the default PhysicalSkyMaterial?

Footnotes

  1. Interestingly, when using Forward Mobile, the artifacts use bilinear filtering as opposed to nearest-neighbor filtering. This makes them appear blurrier.

@Calinou Calinou changed the title Radial size glitch with sky shaders Vulkan Forward+: Visual glitch appears in the radiance map at sizes higher or lower than the default Apr 17, 2023
@clayjohn
Copy link
Member

Looks like the issue is only present when the update mode is set to "Automatic". When selecting a specific mode the issue goes away. So this issue likely comes from the situation where the "Automatic" update mode selects "Realtime" internally. When using the "Realtime" update mode the radiance size has to be 256 when we check that, we should also check if the update mode is set to "Automatic" and realtime is being used internally.

@Lexpartizan
Copy link
Author

Lexpartizan commented Apr 22, 2023

I can confirm this when using the Forward+ rendering method. This does not occur when using the Mobile rendering method. The sky shader fails to load when using the Compatibility rendering method.

It looks like something isn't being resized relative to the default radiance map size (256), so the square appears too large or too small depending on the chosen radiance map size.

That said, the sky shader renders incorrectly for me in the MRP (4.0.2, GeForce RTX 4090 with NVIDIA 530.41.03):1

image

Can you reproduce this when using the default PhysicalSkyMaterial?

Footnotes

  1. Interestingly, when using Forward Mobile, the artifacts use bilinear filtering as opposed to nearest-neighbor filtering. This makes them appear blurrier.

I have been informed of this problem with the my sky shader on new video cards.
The essence of the problem is that the noise function does not work correctly on them. Moreover, I tried different noise functions, including texture, but I got artifacts and incomprehensible circles.

This is what noise looks like on my nvidia 1050.
image

This is what noise looks like on Nvidia video cards of the new series.
image
However, since I don't have a modern graphics card, I can't figure out what the reason is. It is possible that fract or floor are not working correctly. I have heard about the incorrect operation of noise with sine on new nvidia graphics cards, but in this case there is no sine.

This is a separate big story.
But I don't have a modern graphics card to deal with it. I got screenshots with the result of Schumann's work on the new video card after working a little with a person who wanted my sky shader for himself. He took these screenshots and that's how we found out that the noise is the problem. But it was too difficult to work further.
i create new issue for this
#76343

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

Successfully merging a pull request may close this issue.

4 participants