Zylann / godot_voxel

Voxel module for Godot Engine
MIT License
2.72k stars 251 forks source link

Inconsistent results with Procedural Sky ambient light in-game when built with low energy multiplier value #567

Closed CoyanCardenas closed 1 year ago

CoyanCardenas commented 1 year ago

Describe the bug When using procedural sky for dynamic ambient light, results are inconsistent depending on what value the energy multiplier starts at. If you run the game with energy mulitplier at 1, you can lower this value all the way to 0 and back again and get expected results, the scene gets darker, then brighter. However if you run the game with the energy multiplier at a low value, say 0 or 0.01, increasing the energy multiplier to 1 results in a in scene significantly darker ambient light than expected.

To Reproduce Steps to reproduce the behavior:

  1. Open new project.
  2. Add cube mesh, camera, and world environment to scene.
  3. Ensure WorldEnvironment is set to procedural sky, process mode automatic or real time.
  4. In WorldEnvironment inspector set ambient light to Sky.
  5. Set energy multiplier 1, run the game. Reduce Energy Multiplier down to 0 and back again, observing light in scene. Should be as expected.
  6. Close game
  7. Set multiplier to 0.01, run game again. While game is running, increase energy multipler to 1, observe scene lighting is not consistent with previous, or with the Godot editor.

Expected behavior I expect energy multiplier to give consistent results at various values, regardless of what the default value is set to when built.

Screenshots 2023-10-09 12_06_47- Game started with Energy multipler set to 1, expected results at energy multipler 1.

2023-10-09 11_59_51- Game started with Energy multipler set to 0.01, inconsistent results at energy multipler 1.

Environment