-
-
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
[3.x] CPU lightmapper environment energy fixes. #48089
Conversation
It's only used in
|
Yeah, I added the function just so I could use it in The difference between I think |
I guess |
Makes sense, I will update the PR in a bit. |
* Better handling of the scene's environment energy in the lightmapper bakes. * Fixed a bug where ProceduralSky::get_panorama() returned a reference instead of a copy. * Removed includes to Embree's internal header files.
Thanks! |
Cherry-picked for 3.3.1. |
@@ -1254,14 +1254,25 @@ Ref<Image> BakedLightmap::_get_irradiance_from_sky(Ref<Sky> p_sky, Vector2i p_si | |||
|
|||
sky_image->convert(Image::FORMAT_RGBF); | |||
sky_image->resize(p_size.x, p_size.y, Image::INTERPOLATE_CUBIC); | |||
|
|||
if (p_energy != 1.0) { |
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.
With floating point numbers, should this be a tolerance test?
if (abs(p_energy - 1.0) > TOLERANCE)
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.
The check is only a shortcut optimization when the energy value is exactly 1, since x * 1 = x
. Any other value would give a different result.
ProceduralSky::get_panorama()
returned a reference instead of a copy.