-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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: LightmapGI banding visible on baked lighting due to 8 bpc lossless compression being used by default (even with denoising enabled) #53436
Comments
I think this is caused by an incorrect setting for the compress mode of the lightmap texture. For the reproduction project is the lightmap data stored in 'test.lmbake'. This data contains a texture The first setting does not have enough precision causing the banding effect. The latter is much better and the banding is reduced. The setting can be adjusted and the texture re-imported, after which the banding is reduced. |
I did find another effect which is that the color between real-time light and bake-light differs. This can also be seen in the reproduction project. Maybe we should open a separate issue for that. Any way I will investigate those color differences. |
See #53388 for the different color output between baked and real-time lights. I didn't make a comparison with Vulkan yet, but it's possible that a similar issue to GLES3 occurs there. |
I propose to close this issue as it is caused by an incorrect setting (see comment). In case this explanation is not considered a solution, I like to understand what needs to be done further for this issue. |
I can confirm that changing the compression mode to VRAM Compressed, VRAM Uncompressed or Basis Universal resolves the issue: However, we should make sure that newly created lightmap textures automatically use the right compression setting (VRAM Compressed setting in this case). Therefore, we should keep this issue open for now 🙂 |
Needs updated MRP, the attached one is completely black in alpha 9 and spams errors. |
this was fixed by #73136 |
For future reference, the default will need to change from VRAM Uncompressed to VRAM compressed once we get betsy merged |
Godot version
4.0.dev (2fc31fd)
System information
Fedora 34, GeForce GTX 1080 (NVIDIA 470.57.02)
Issue description
A significant amount of banding is visible on direct baked lighting (even with denoising enabled). This applies to lights whose bake mode is set to Static rather than the default Dynamic, and becomes more noticeable when you disable bounces entirely.
I suspect there's a precision issue somewhere in the compute shader used to bake the lightmap.Edit: This is caused by lightmaps using Lossless compression by default instead of VRAM Compressed (or VRAM Uncompressed). Standard lossless and lossy compression does not support HDR – only VRAM compression, Basis Universal or the uncompressed storage modes do.
Enabling denoising does not improve the situation, since denoising isn't meant to combat banding anyway. Enabling the screen-space debanding filter doesn't resolve this issue either, as the banding is part of the lightmap texture itself.
GLES3 does feature bicubic lightmap sampling which can hide banding a little. Nonetheless, there's still a lot of banding in the lightmap texture that wouldn't be hidden by bicubic sampling once it's implemented in the Vulkan renderer.
Steps to reproduce
Real-time light in Vulkan (good)
Fully baked light in Vulkan (bad)
GLES3 in
3.x
(good)Minimal reproduction project
master
: test_light_attenuation_lightmap_master.zip3.x
(for comparison, baked with Backport new 3D point light attenuation as an option (3.x) #52918 enabled): test_light_attenuation_lightmap_3.x.zipThe text was updated successfully, but these errors were encountered: