godotengine / godotengine/godot

Volumetric Fog overlaps over Distance Fog

Open
#95,165 4 comments 0 reactions 0 assignees View on GitHub
discussion topic:3d topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in 4.3.4, 4.3rc2

### System information

Godot v4.3.rc2 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1650 (NVIDIA; 32.0.15.5612) - AMD Ryzen 3 2200G with Radeon Vega Graphics (4 Threads)

### Issue description

When you enable both Volumetric fog and Distance fog, any point where both fogs overlap, the volumetric fog will lit up/uncover any surface that are expected to be covered by the distance fog. My expected outcome is for the distance fog to always cover the surfaces that are meant to be hidden by it. Not sure if theres a perspective where the expected outcome is the current one.

![Captura de pantalla 2024-08-05 090654](https://github.com/user-attachments/assets/ceafcb09-d01b-4a68-a58e-372f18b2266d)
Windows to black background at end of hallway.

![Captura de pantalla 2024-08-05 093252](https://github.com/user-attachments/assets/3d594af4-5c7f-4b82-ab63-de64428b2e19)
Window completely hidden by fog at end of hallway

![Captura de pantalla 2024-08-05 090634](https://github.com/user-attachments/assets/96365674-7908-40e4-95ff-2b744f7f5aa5)
Volumetric fog being lit up by the indirect lighing (SDFGI), overlapping the distance fog, lighting up the surfaces previously covered by the distance fog

![Captura de pantalla 2024-08-05 090745](https://github.com/user-attachments/assets/58658129-002a-4ec8-be1a-e9f6b62266f8)
Volumetric fog being lit up by a spotlight with volumetric enabled, overlapping the distance fog, lighting up the surfaces previously covered by the distance fog

### Steps to reproduce

1. Open the project and the TestScene.tscn
2. Move the camera behind SpotLight3D1, looking towards the window
3. Observe the wall and windows, previously covered by fog, become visible
4. Enable SDFGI in the WorldEnviroment node
5. Move the camera behind SpotLight3D2, looking towards the window
6. Observe the wall and windows, previously covered by fog, become visible

### Minimal reproduction project (MRP)

[MultiFogTest.zip](https://github.com/user-attachments/files/16499249/MultiFogTest.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the MultiFogTest.zip reproduction project and open TestScene.tscn. Follow the listed camera positions and compare the wall and window visibility with Distance Fog, Volumetric Fog, SDFGI, and volumetric spotlights enabled; done means the interaction matches the intended fog occlusion behavior without exposing surfaces covered by Distance Fog.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, godot
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.