X Tutup
Skip to content

Rewrite SSIL (which approximates global illumination using screen space information)#117241

Draft
MopanionStudios wants to merge 7 commits intogodotengine:masterfrom
MopanionStudios:ssilvb
Draft

Rewrite SSIL (which approximates global illumination using screen space information)#117241
MopanionStudios wants to merge 7 commits intogodotengine:masterfrom
MopanionStudios:ssilvb

Conversation

@MopanionStudios
Copy link

@MopanionStudios MopanionStudios commented Mar 9, 2026

Rewritten SSIL logic

Adresses Improve SSIL/SSAO

The current state of Godot's SSIL can be seen as quite far behind compared to current state of the art implementations, and so I have rewritten the current SSIL logic to generally match the performance of the current SSIL, but with a more modern, up-to-date approach. I have discussed it quite a bit in the rendering channel.

This approach uses visibility bitmasks, a relatively new method for screen space effects such as AO and GI, that keeps a far more accurate track of occlusion by storing visibility in a 32-bit "bitmask", with each bit representing that sector's visibility. This allows for far more appealing, accurate visuals at a relatively minimal added cost, and was easily shared between AO & GI since it is derived from GTAO-VB logic. This technique has been pretty well documented and I will leave some references I used below.

The most prominent changes made are as such:

  • Rewritten SSIL that closely matches this Shadertoy's implementation
  • Performance comparable to the current SSIL in-engine
  • Optional inclusion of GTAO-VB at little extra cost

Showcase

(intensity 1.0, ao strength 0.5, thickness 0.3, backface rejection enabled, radius 1.6-2.0):
Screenshot 2026-03-09 000620
Screenshot 2026-03-09 000947
(intensity 1.0, ao strength 0.5, normal rejection 1.0, radius 5.0)
Screenshot 2026-03-09 003152
Screenshot 2026-03-09 003428

Changes needed

  • Rebase PR, get up to code for merging
  • Clean up, secure, and optimize logic
  • Expose more parameters
  • Improve performance
  • Skip logic when able to (i.e remove any AO calculations if type is indirect lighting only)
  • Gather feedback and make necessary changes based on it
  • Fix half size option
  • Fix sampling issues (namely "the vortex")

I am going to be quite busy for about a week, so I won't have space to work on this for that time. This is still a draft PR, as its not finished and I have hopes that I can gain feedback to improve this (ideally I'll have made a stupid mistake in code and once I fix it the quality improves ten-fold... lol). To go into detail about the "vortex" issue, I'd suggest using medium quality and aiming the center of the screen at an area with lots of indirect illumination. I don't know what causes it, totally stumped, but it creates a strange vortex-ish shape in the center of the screen. On top of that, at lower quality settings, the gap between slices/samples becomes quite apparent, and so it does not scale well between quality, especially compared to the current SSIL. Some help on those issues would be great!

References/Inspiration

@Saul2022
Copy link

Saul2022 commented Mar 9, 2026

Looks amazing , though i'd recommend adding other test screenshot of test scenarios, like in dark areas where there is a emissive object moving around or in other light types.

Will test soon or prob when the artifacts are ready. Amazing job homie.

@AThousandShips AThousandShips added this to the 4.x milestone Mar 9, 2026
@fire fire changed the title Rewrite SSIL Rewrite SSIL (which approximates global illumination using screen space information) Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup