GI looks different when the main scene is reloaded. I've already tried enabling and disabling SDFGI with no success:

When I run the game with SDFGI turned off, the scene always looks the same after reloading. But if I turn SDFGI on, the scene will look dark when it's reloaded.

  1. First image is when I first run the game.
  2. Second image has no SDFGI (looks the same after every reload).
  3. Third image is after reloading the scene with SDFGI enabled (once, twice... doesn't matter).
  4. Fourth image is when I disable SDFGI, run the game and, with the game open, enable SDFGI again (also looks bad when reloaded).
  5. Fifth image is how it looks in editor with SDFGI enabled.

I reload the scene with get_tree().reload_current_scene()

Also tried refreshing SDFGI with:

func _ready():
    env.environment.sdfgi_enabled = false
    await get_tree().process_frame
    env.environment.sdfgi_enabled = true

Tried that in Godot 4.2.1 and 4.3. Results were the same. What am I missing?

Thank you.

    • Best Answerset by Dio

    Managed to find a fix... It's ugly but seems to be working consistently.

    I had to hide and show each lamp as soon as the scene reloads:

    func _ready():
        # unbug SDFGI on scene reloads
        self.hide()
        self.show()

    I also realized that everytime I change between scenes on the editor the same problem happens. All shadows get pitch dark because the GI calculation for point lights is gone. However, the shadows at the exterior of the house remain well lit, suggesting that directional lights are still being used by SDFGI but not the point lights.

    Enabling and disabling SDFGI does nothing, the solution is to manually (or using a tool script) hide and show each point light on the scene tree.

  • Best Answerset by Dio

Managed to find a fix... It's ugly but seems to be working consistently.

I had to hide and show each lamp as soon as the scene reloads:

func _ready():
    # unbug SDFGI on scene reloads
    self.hide()
    self.show()

I also realized that everytime I change between scenes on the editor the same problem happens. All shadows get pitch dark because the GI calculation for point lights is gone. However, the shadows at the exterior of the house remain well lit, suggesting that directional lights are still being used by SDFGI but not the point lights.

Enabling and disabling SDFGI does nothing, the solution is to manually (or using a tool script) hide and show each point light on the scene tree.

you should open an issue to make them fix it on gh