godotengine / godotengine/godot

FogVolume incorrectly culls the "wide" face of thin volumes when looking in a tangent direction from it.

Open
#115,154 2 comments 1 reaction 0 assignees View on GitHub
bug topic:3d topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproducible in v4.5.1.stable.mono.official [f62fdbde1] and v4.6.rc.custom_build [895630e85] (no modifications)

### System information

Godot v4.6.rc (895630e85) - Windows 10 (build 19045) - Multi-window, 2 monitors - Direct3D 12 (Forward+) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 32.0.15.8157) - Intel(R) Core(TM) i5-10600KF CPU @ 4.10GHz (12 threads) - 15.92 GiB memory

### Issue description

When the camera is near but still outside of the large face of a "square shaped" (2 long dimensions, 1 thin dimension) FogVolume, there is a range of directions where the segment of the FogVolume "next" to the camera will be incorrectly culled, creating a sharp discontinuity and "band" of fog where the far faces are still being correctly rendered

(note the gizmo indicating the shape of the volume, it extends below the camera and should be foggy)
Image

[See this video for specific examples of the shape, camera position, and angle ranges.](https://youtu.be/hBxQILsBgKw) This occurs in both the editor and in play mode. It is scale agnostic, very large and small fog volumes will produce the same result as long as their proportions are generally similar. It's still occurs with different volume sizes and depths.

### Steps to reproduce

Using the MRP below, pick one of the volumes in the scene, position the camera above or below the "wide" face and rotate your camera towards and away from the surface it as seen in the previously linked video

### Minimal reproduction project (MRP)

[fog_test.zip](https://github.com/user-attachments/files/24725160/fog_test.zip)

Contributor guide

Open the contributing guide

Research direction

Open the attached fog_test.zip MRP in the reported Godot versions and reproduce the band by positioning the camera near a FogVolume's wide face and rotating it toward and away from the surface. Compare the visible fog with the volume gizmo and video examples, then trace the FogVolume rendering and culling path. Done means the near segment remains visible across the reported tangent-direction ranges in both the editor and play mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
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.