godot
godot copied to clipboard
Vulkan: Volumetric fog not rendering since 4.0.alpha13
Godot version
4.0.alpha13
System information
MacOS Monetary 12.4, ARM64 (Apple M1 Max)
Issue description
Volumetric fog — including global world environment and fog volumes, are not rendered in Godot 4.0.alpha13, on my M1 Mac.
Godot 4.0, alpha 13:
Godot 4.0, alpha 12:
Steps to reproduce
Open minimal reproduction project in Godot 4.0, alpha 13. Volumetric fog is not rendered.
Minimal reproduction project
If you can compile the engine from source, you could look into bisecting the regression to greatly speed up troubleshooting.
4.0.alpha12 (good)'s commit hash is: 2c11e6d9efc42370a8d7537eaff8b1ea78a283e5
4.0.alpha13 (bad)'s commit hash is: 82811367cb36d3124d4e8c0a9c4c7f82dc64f9e4
That was surprisingly easy to get it to compile from source!
Bisected to this commit: https://github.com/godotengine/godot/commit/bad5c659a42cf31e9004280dfa61838be1f6280a
Also noticed in any builds that were bad, I'm getting a lot of error reports:
I've noticed this too. though I should note that in my case, volumetric fog works fine, until I move the camera a bit, at which point it stops working and error spam just like this begins. (tested on windows 7 with an AMD RX 570)
Can't reproduce this (Linux, GTX 1650) but the command line output shows:
ERROR: 1 shaders of type VolumetricFogShaderRD were never freed
at: ~ShaderRD (servers/rendering/renderer_rd/shader_rd.cpp:702)
ERROR: 1 RID allocations of type 'N10RendererRD6ShaderE' were leaked at exit.
ERROR: 1 shaders of type VolumetricFogShaderRD were never freed
at: ~ShaderRD (servers/rendering/renderer_rd/shader_rd.cpp:702)
Could be an issue the Nvidia driver ignores for some reason.
This is working fine for me:

However this includes #63901 which may end up fixing things.
This is likely macOS only, and fixed by https://github.com/godotengine/godot/pull/64106.
@akien-mga @bruvzg thanks guys! Just built from master and it's working for me 🙏