Skip to content

Compatibility Renderer: Environment's reflected_light_source property does not display light properly on "Disabled" if it is not set to "Background" or "Sky" modes beforehand. #92779

Description

@FireCatMagic

Tested versions

Godot v4.3.beta1 - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce RTX 4050 Laptop GPU (NVIDIA; 31.0.15.5186) - 13th Gen Intel(R) Core(TM) i5-13500HX (20 Threads)

System information

Godot v4.3.beta1 - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce RTX 4050 Laptop GPU (NVIDIA; 31.0.15.5186) - 13th Gen Intel(R) Core(TM) i5-13500HX (20 Threads)

Issue description

Environment has a property called "reflected_light_source" which accepts an enum value with the following values:
image
I'm going to set these values in editor, then run the project, and show the results:
image
image
image
image
image
image

As you can see, when you set the backround to disabled in the editor, it totally breaks the light and makes the shadows totally dark.
But this isn't the case if you have set the value to REFLECTION_SOURCE_BG or REFLECTION_SOURCE_SKY, and THEN it displays properly.
firefox_GnjVFeAqnc
As you can see here, it started out with broken lighting on "REFLECTION_SOURCE_DISABLED". But when I switched it to the other modes, then switched it back, it displayed as it correctly should.

Steps to reproduce

  1. Make an environment.
  2. Set the environment reflected_light_source property to ReflectionSource::REFLECTION_SOURCE_DISABLED
  3. Start the project
  4. Observe that the lighting is broken
  5. set reflected_light_source to any of the other enum values
  6. set reflected_light_source back to ReflectionSource::REFLECTION_SOURCE_DISABLED
  7. Observe that the lighting in this mode now displays as it should

Minimal reproduction project (MRP)

New Compressed (zipped) Folder.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions