-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Vulkan: Volumetric fog looks incorrect for SpotLight3D with shadow enabled, depending on the camera angle #57722
Comments
As a workaround, use a FogVolume with a Cone shape parented to the SpotLight3D node. It won't be able to have shadows though (but the light itself will still be able to cast shadows). |
I've noticed that the range of a spotlight also influences interaction with fog volumes as well as viewing angle. For a spotlight which visibly interacts with fog, extending the range reduces the visible effect of this issue, including making the artifacting easier to see at range. The above pictures show these effects with a spotlight with a range of 2k, from two different viewing angles. It's worth noting that even with shadows enabled, the projected effect doesn't interact with cast shadows at all. Hopefully these observations make it easier to locate a root cause. |
Yea i can reproduce this issue in beta 14 not sure if this pr fixes it #71832 f |
Fixed by #73919. |
Godot version
4.0.alpha (9d1626b)
System information
Fedora 34, GeForce GTX 1080 (NVIDIA 495.46)
Issue description
Volumetric fog looks incorrect for SpotLight3D with shadow enabled, depending on the camera angle. This does not affect OmniLight3D, which looks correct after reloading the scene if shadows were enabled for the first time after enabling volumetric fog. (That issue should be reported separately, but I haven't been able to reproduce it consistently yet.)
When reaching a "broken" camera angle, very little fog albedo will be lit (if any). It flickers on and off depending on the camera angle and position.
Left (green): OmniLight3D with shadow enabled, right (red): SpotLight3D with shadow enabled
Shadows disabled
Shadows enabled with working camera angle
Shadows enabled with broken camera angle
See also this video:
simplescreenrecorder-2022-02-06_20.16.15.mp4
Steps to reproduce
Minimal reproduction project
test_volumetric_fog_point_shadows.zip
The text was updated successfully, but these errors were encountered: