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: SDFGI Artifacts due to sky sampling when Read Sky Light is enabled #61504

Open
Tracked by #55327
MidnightEdge opened this issue May 28, 2022 · 2 comments
Open
Tracked by #55327

Comments

@MidnightEdge
Copy link

Godot version

4.0.alpha8

System information

Windows 10, Vulkan Clustered, RTX 3060Ti, 511.79

Issue description

Cross shaped and world normal aligned artifacts appear on objects when enabling SDFGI.
It seems like SDFGI is sampling indirect lighting from incorrect directions.
The scene in the screenshots only have a directional light, a WorldEnvironment node with a sky background and SDFGI enabled, and a sphere with a default white material.
The sphere's global illumination mode is "disabled".

SDFGI On
SDFGI On
SDFGI Off
SDFGI Off

Steps to reproduce

Add any object to a scene and enable SDFGI in the WorldEnvironment.
Preferrably a white and smooth object, so that the artifacts are easier to spot.

Minimal reproduction project

SDFGI.zip

@Calinou
Copy link
Member

Calinou commented May 28, 2022

Not related to this issue (for now), but you forgot to set the global illumination mode on the MeshInstance3D:

image

Set it to Static, then save and reload the scene. This won't make a visual difference if there is only one object in the scene, but it will once you add more objects to the scene for light to reflect on.

That said, the appearance looks expected to me. Read Sky Light likely has some inaccuracies in its sampling, but it's probably not noticeable in most real world scenes:

image

image

SDFGI Debug Cascades debug draw mode looks like this:

image

SDFGI Debug Cascades debug draw mode with much lower Cell Size and more compact Y scaling:

image

There does appear to be some singularities or something at some angles (which manifest as pitch-black spots):

image

I'm not sure if much can be improved here without decreasing performance. Increasing Normal Bias and/or Probe Bias can help, but it'll also make light leaking more noticeable.

@Calinou Calinou changed the title SDFGI Artifacts Vulkan: SDFGI Artifacts due to sky sampling in when Read Sky Light is enabled May 28, 2022
@Calinou Calinou added this to the 4.0 milestone May 28, 2022
@Calinou Calinou changed the title Vulkan: SDFGI Artifacts due to sky sampling in when Read Sky Light is enabled Vulkan: SDFGI Artifacts due to sky sampling when Read Sky Light is enabled May 28, 2022
@Calinou Calinou added the bug label May 28, 2022
@MidnightEdge
Copy link
Author

I have left the GI Mode disable intentionally, to show that it seems to be an unrelated issue.

image

Here's a different scene, with Read Skylight and Occlusion disabled as well, even the probes seem to contain incorrect data.
There's nothing to the right that could reflect light from the bottom, yet the probe has indirect lighting from that direction.
image

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

3 participants