-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
LightmapGI Directional results in more aliased shadows for lights with Static bake mode #88470
Comments
There's no bicubic interpolation to disable because it hasn't been reimplemented in 4.x yet 🙂 What you're pointing out is likely the DirectionalLight Angular Distance property not being taken into account when baking directional lightmaps (or its Blur multiplier). It could also be due to the lightmap baking causing aliasing on its own when Directional is enabled, even if angular distance is being taken into account. |
I can confirm this on 4.3.beta 92c8e87. This is not a tonemapping issue: it stays regardless of which tonemapper is used, and is present in all rendering methods. It also occurs even if the light's Angular Distance is The issue does not go away when using darker materials (which rules out a clamping/overexposure issue) and is present with all light types, not just DirectionalLight3D. Minimal reproduction project: test_lightmap_directional_shadow_aliasing.zip
|
Turns out it is not an easy fix. I still can't find why its not working. However, I can confirm that the problem is only with the JNLM denoiser, using OIDN works fine |
Directional lightmaps seem to work with bicubic sampling in I'm not sure if JNLM is really able to smooth out shadows. It's intended to do denoising only after all, so any shadow smoothing is more of a byproduct than an intended consequence. Shadows on directional lightmaps seem to look smooth enough already with bicubic sampling and direct light antialiasing, even without any denoiser in place. This seems like a good thing to me, since I expect shadows to always be smooth regardless of the denoiser in use. |
I think I've figured out the root cause of this issue, it has to do with how we scale the spherical harmonics. We are baking the directional lightmaps way too bright and then scaling back at run time. I'm trying to figure out the proper scaling factors now. This will impact the work that @BlueCube3310 is doing on scaling the L1 spherical harmonics for compression |
Yes, I remember discussing this in #61910. It turns out what I was doing was actually wrong (which was our initial guess). |
Using the coefficients from https://media.contentapi.ea.com/content/dam/eacom/frostbite/files/gdc2018-precomputedgiobalilluminationinfrostbite.pdf we can get things to look the same between directional and non-directional!
|
Tested versions
4.3 Dev3
System information
Windows 11, Nvidia RTX4070ti, AMD Ryzen7700x
Issue description
Activating Directional in LightmapGI disables Bicubic Interpolation.
Directional on:
Directional off:
Steps to reproduce
Turn on Directional in Lightmap GI.
Minimal reproduction project (MRP)
Not needed. Just turn the setting on in any scene.
The text was updated successfully, but these errors were encountered: