godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.12k stars 21.19k forks source link

3D Environment sky will have wrong brightness when setting background_energy_multiplier #75736

Open Abadunala opened 1 year ago

Abadunala commented 1 year ago

Godot version

4.0.2

System information

Windows10, Vulkan, amd6700xt

Issue description

I don't think it's a hdr problem or something similar, more like a editor problem. Please read the step below for more info. image

Steps to reproduce

You should set some property in editor by yourself, because the problem will disappear when reload the project.

  1. Try to set different value to energy_multiplier property in sky's sky_material
  2. Run the game, the brightness looks normal
  3. Close the game, then set energy_multiplier property back to default
  4. Instead we set the background_energy_multiplier property in environment
  5. Run the game, the brightness looks not right
  6. This problem will disappear when save and close the project and restart it

Minimal reproduction project

bugs2.zip

JohanAR commented 1 year ago

Not sure if related, but I noticed that if I set a night texture for the sky material, and then reset it to default (empty property) then the sky also gets messed up until I reload the project.

jotson commented 1 year ago

I'm confirming this issue in 4.0.3.rc1. When using a procedural sky, if I change the background_energy_multiplier then run the scene, the running game has different lighting than the editor. If I close the project and reopen, then the lighting is fixed: it is the same in the editor and the running game again.

Changing sky_energy_multiplier in the procedural sky material works as expected.