Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volumetric fog stops taking lights into account when changing scene under specific circumstances #83990

Closed
Tracked by #69579
ArtyIF opened this issue Oct 26, 2023 · 2 comments

Comments

@ArtyIF
Copy link

ArtyIF commented Oct 26, 2023

Godot version

v4.2.beta2.mono.official [f8818f8]

System information

Godot v4.2.beta2.mono - Fedora Linux 39 (Workstation Edition) - Wayland - Vulkan (Forward+) - integrated Intel(R) Graphics (ADL GT2) () - 12th Gen Intel(R) Core(TM) i3-1215U (8 Threads)

Issue description

When changing from a scene with a WorldEnvironment with volumetric fog enabled to a scene with the same WorldEnvironment (not sure if it should actually be the same), volumetric fog stops taking lights (at least DirectionalLight3Ds) into account. This is fixed if the first scene has a DirectionalLight3D with shadows on.

Expected:

image

Result:

image

Might be related to #83685

Steps to reproduce

  1. Open the MRP
  2. Run it normally
  3. Hit the Load Scene button
  4. See that the fog doesn't account for the directional light
  5. Open scene1b.tscn and run it
  6. Hit the Load Scene button
  7. See that the fog works as expected

Minimal reproduction project

VolumetricFogBugMRP.zip

@interpol-kun
Copy link

I also ran into similar problem: volumetric fog doesn't take in account the lights which were disabled at the start of the scene, but were enabled later by game logic.

@Calinou
Copy link
Member

Calinou commented Feb 12, 2024

Thanks for the report! Consolidating in #83685, as this is due to the same cause. (The issue goes away in the MRP if you resize the window or change the 3D resolution scale factor, which causes buffers to be recreated.)

@Calinou Calinou closed this as completed Feb 12, 2024
@Calinou Calinou removed this from the 4.x milestone Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants