Skip to content
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

Disable lightmapper_rd module in non-editor builds (and in Android editor) #82521

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Sep 29, 2023

This is consistent with xatlas_unwrap, which isn't enabled in non-editor builds and the Android editor either. There is currently no way to use the lightmapper in a non-editor build anyway, as it doesn't expose any methods (and even if there was, there would be no way to perform UV2 unwrapping in the exported project).

This reduces binary size of a stripped Linux x86_64 export template build by ~164 KB (compared against fe8a58b).

  • Before: 61,254,808 bytes
  • After: 61,091,000 bytes (-0.26%)

This also moves the PrimitiveMesh texel size project setting so that it's defined when the module is disabled, and adds a property hint to it.

In the future, if we decide to make this functionality available in non-editor builds, it should also be made available with xatlas_unwrap as a build-time option (similar to #73003).

I tested this PR in a project with existing baked lightmaps and it works as expected (no errors, it renders correctly).

…editor)

This is consistent with `xatlas_unwrap`, which isn't enabled in non-editor
builds and the Android editor either. There is currently no way to
use the lightmapper in a non-editor build anyway, as it doesn't expose
any methods (and even if there was, there would be no way to perform
UV2 unwrapping in the exported project).

This reduces binary size of a stripped Linux x86_64 export template
build by ~164 KB.

This also moves the PrimitiveMesh texel size project setting
so that it's defined when the module is disabled,
and adds a property hint to it.
@akien-mga akien-mga modified the milestones: 4.x, 4.2 Sep 29, 2023
@akien-mga akien-mga merged commit 0cd4731 into godotengine:master Sep 29, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the lightmapper-disable-module-templates branch October 1, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lightmapper_rd module is included in export templates, even though it can't be used
3 participants