-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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: WorldEnvironment node leaks 2.85GB of render target VRAM when used (due to high sky radiance size) #64677
Comments
P.S. Maybe it's not a bug, but this setting is dangerous. This setting should be guarded somehow if possible. Running the scene with editors "run_current_scene" button will double VRAM beyond 8GB, push it into shared RAM - choke ram on a 16GB machine and push into HDD paging... considering it randomly takes more memory when it runs off into RAM like that, from 2 to 6GB ram, i suspect it might be a leak of some kind. |
It seems to be a configuration issue. The sky creates a giant texture cube array based on user supplied radiance size, which eats 2GB VRAM in your case (RGBA16F, 2048x2048x8x6, with full mipmap). I don't think the sky radiance cache need such high resolution in practice. The content generally has very low frequency, and the aliasing closing to horizon can be fixed with smart uv remapping according to a newer paper, section 5.3. I'm not sure if godot supports such custom uv remapping for sky lut size optimization. I haven't dig into godot's sky implementation, but the radiance cache looks unnecessarily large to me. I feel it's fine for most cases with one sky panorama for high quality background drawing, and a single layer cubemap with 5 mipmaps for IBL, each mip stores prefilterred irradiance with different roughness. |
Whoa, why do you need 2048 radiance size? (And why isn't it capped lower, I seem to recall many discussions about IGPUs freezing even with 1024 or 512) |
I was playing with Sky settings and set it randomly, for who knows what reason, maybe I saw low resolution in SDFGI or SSAO or whatever. Ah, right, building windows look slightly nicer with 2048, as they happen to be reflective in the original .gtlf/blender shader and it translates into .gtlf file. |
It doesn't advertise eating 2.85 GB VRAM, 2048 feels like it should take 16mb or 64 at worst. |
And yes, I saw the tooltip, and either ignored it, or never saw it when setting it. At least i did not see an issue when setting it... |
We need to measure this differently, or with an additional number in the setting mentioning VRAM size, i feel. |
Radiance sizes above 512 should probably not be exposed, like in 3.x. These take a lot of time to generate, which can noticeably slow down loading on slower/mobile GPUs (or even cause crashes as mentioned above).1 Also, it's very unlikely that radiance sizes above 512 will make any meaningful visual difference (outside of pixel peeping, that is). If you need very sharp reflections, chances are that you'll be using ReflectionProbes anyway.
It's already unexposed from the editor in 3.x, but not in Footnotes
|
Duplicate of #64683 For clarity, a radiance size of 2048 is expected to take multiple GBs of VRAM, the future work here is to communicate that effectively to users and see if we can shrink the default memory usage to something more palatable. |
Godot version
master ( 29492f9 ) godot 4 alpha13
System information
Windows 10, RX 590 and probably 2080 TI confirmed, Vulkan, AMD Driver 22.5.1
Issue description
VRAM ussage of Render Targets balloons to 2.85GB VRAM in editor or in game until the scene is closed. Causes VRAM into Shared RAM into hard drive related stutters-blocking of framerate under ideal conditions. Might be related to procedural sky settings, does not seem related to SDFGI or other settings.
.
Steps to reproduce
Minimal reproduction project
WorldEnvVRAMIssue.zip
The text was updated successfully, but these errors were encountered: