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

SDFGI visual banding / Regression in Godot 4.4 beta RC1 #101746

Closed
Tracked by #55327
TheDamocles opened this issue Jan 18, 2025 · 9 comments · Fixed by #102105
Closed
Tracked by #55327

SDFGI visual banding / Regression in Godot 4.4 beta RC1 #101746

TheDamocles opened this issue Jan 18, 2025 · 9 comments · Fixed by #102105

Comments

@TheDamocles
Copy link

TheDamocles commented Jan 18, 2025

Tested versions

In the current 4.4 beta RC1, SDFGI encounters visual banding and more light leaking compared to the same scene rendered in 4.3 stable (and previous version 4.2).

The problem did not appear in 4.4 dev 7 yet. So some change after that release must cause it.

System information

Linux Mint 22, AMD Ryzen 7 7840HS w/ Radeon 780M Graphics × 8 + GeForce RTX 4060 Max-Q / Mobile

Issue description

Light leaks more prominently through thinner walls, and the shadows create visual horizontal bands that where not visible in 4.3.
Also the light looses energy quicker, resulting in darker bounces.

The scene uses a simple imported glb mesh for the walls and windows in the scene.

The only change to SDFGI I can see recently was about handling custom sky rotation.

Godot 4.3 stable:
Image

Godot 4.4 beta 1
Image

Steps to reproduce

Should be reproducible with SDFGI on any more complex scene with thinner walls that can cause light leaking and angled surfaces.

Minimal reproduction project (MRP)

none attached

@Calinou
Copy link
Member

Calinou commented Jan 18, 2025

Please upload a minimal reproduction project1 to make this easier to troubleshoot.

Footnotes

  1. A small Godot project which reproduces the issue, with no unnecessary files included. Be sure to not include the .godot folder in the archive (but keep project.godot).

    Drag and drop a ZIP archive to upload it. Do not select another field until the project is done uploading.

    Note for C# users: If your issue is not C#-specific, please upload a minimal reproduction project written in GDScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a Mono setup available.

@TheDamocles
Copy link
Author

TheDamocles commented Jan 18, 2025

A minimal test, created with Godot 4.3 stable
SDFGI_Test_Minimal.zip

I use C#, but that just for the ingame camera controller. You can delete the "actor" node if needed.
The visual issues can be seen already in the editor itself.

The scene looks still fine in 4.4 Dev 7, the issues crop up in the Beta 1 build. (Im using the mono builds here)

@JekSun97

This comment has been minimized.

@matheusmdx
Copy link
Contributor

I'm able to reproduce the issue, i'll bisect.

@matheusmdx
Copy link
Contributor

Bisected to #100441, @StaydMcMuffin

Image

@clayjohn
Copy link
Member

Cc @StaydMcMuffin must be a problem with the normal we write out for SDFGI

@clayjohn clayjohn moved this from Unassessed to Bad in 4.x Release Blockers Jan 20, 2025
@StaydMcMuffin
Copy link
Contributor

Cc @StaydMcMuffin must be a problem with the normal we write out for SDFGI

I'm actually stumped by this one. Assuming the normals that get written out are from the normal_output_buffer/normal_roughness_output_buffer variables assigned in the MODE_RENDER_MATERIAL/MODE_RENDER_NORMAL_ROUGHNESS blocks at the end of the shader, there should be no real difference from my changes, as these seem to just pack the final shading normal.
Granted I'm not very familiar with the SDFGI side of things, so someone more knowledgeable than I should probably take a look. Perhaps there's a discrepancy between what's being output and what the SDFGI shaders expect?

@clayjohn
Copy link
Member

Solved! We were using the geo_normal for writing out the normals for SDFGI instead of using the normal_interp. So we were wrongly flipping the normal direction based on gl_FrontFacing when we shouldn't have

@TheDamocles
Copy link
Author

Thanks for solving this issue. Looking forward to 4.4

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

Successfully merging a pull request may close this issue.

7 participants