-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Change the light attenuation formulas. #44941
Conversation
Is it possible if you also changed the formulas in the gltf document for importing and exporting lights at the same time. godot/modules/gltf/gltf_document.cpp Line 4936 in 6e23ab4
godot/modules/gltf/gltf_document.cpp Line 5027 in 6e23ab4
See original test cases from gltf assets in #39450 Edited: Had the wrong link for exporting lights. |
There are similar looking equations in other places, are they meant to change too? (Non exhaustive list, I just looked for
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Subject to Akien's comment above. It looks like you accidentally removed a line.
No, spot attenuation is ok, this will never be physically very correct anyway, we need to invert it though. @JFonS was planning to work on this, we can do it a separate PR, and this can be a good guide of all the places that need to be touched (though probably in this case, it needs to be inverted on the CPP) |
@reduz the volumetric fog attenuation should change though. |
Yup, I already found a way to properly invert the angle attenuation. I will also make sure this attenuation is consistent across LM/SDFGI/GIProbe etc. because currently there are some discrepancies. |
-Much better looking, physically based. -Almost negligible extra cost.
1090abe
to
446618c
Compare
@clayjohn ok, added the missing fog one. Should probably be good to merge once CI passes. |
-Much better looking, physically based.
-Almost negligible extra cost.
Pictures (Old Left, New Right):
Videos:
Old:
old_attenuation.mp4
New:
new_attenuation.mp4