-
-
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
[3.2] Reduce lightmaps file size. #46054
Conversation
if env["platform"] == "windows" and not env.msvc: | ||
env_thirdparty.Append(CPPFLAGS=["-mstackrealign"]) |
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.
On a related note, you may be interested in this if you haven't seen it: I did have a little try at getting it to work but not much joy. |
599fab5
to
7932f3c
Compare
@lawnjelly Looks interesting indeed, but seems a bit too involved to get working... especially in 3.2. I updated the PR according to the feedback. I also enabled sRGB usage for low dynamic range textures, which significantly reduces banding. |
Added BakedLightmap.use_hdr and BakedLightmap.use_color properties that can reduce the flie size of lightmap texture at the expense of quality. Changed the denoiser to work in a single buffer, reducing RAM usage. Also added the `-mstackrealign` flag in the denoiser compilation for MinGW builds. This flag helped fix a bug in Embree, so I want to see if it will help fix GH godotengine#45296.
7932f3c
to
56bf256
Compare
Thanks! |
A couple of commits that should help reduce the lightmap's file size:
Backport EXR compression support from master: this alone already makes a big difference, with EXR files being about 1/3 in size compared to their uncompressed equivalent.
Added options to reduce file size even further:
These two options can be used independently or can be combined to get the smallest texture file size possible.
I changed the denoiser to work in a single buffer, reducing RAM usage, and also added the
-mstackrealign
flag in the denoiser compilation for MinGW builds. This flag helped fix a bug in Embree, so I want to see if it will also help with #45296.