File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,26 @@ if env.dev_build:
5050
5151env_thirdparty = env_basisu .Clone ()
5252env_thirdparty .disable_warnings ()
53+
54+ # Disable unneeded features to reduce binary size.
55+ # <https://github.com/BinomialLLC/basis_universal/wiki/How-to-Use-and-Configure-the-Transcoder>
56+ env_thirdparty .Append (
57+ CPPDEFINES = [
58+ # Storage formats.
59+ # Godot only implements `.basis` support through basis_universal.
60+ # Support for `.ktx` files are implemented with a direct libktx implementation.
61+ # Building the encoder requires `BASISD_SUPPORT_KTX2` to be enabled,
62+ # so we can only disable Zstandard compression for `.ktx` files
63+ # (this is not used in `.basis` files).
64+ ("BASISD_SUPPORT_KTX2_ZSTD" , 0 ),
65+ # GPU compression formats.
66+ ("BASISD_SUPPORT_ATC" , 0 ), # Proprietary Adreno format not supported by Godot.
67+ ("BASISD_SUPPORT_FXT1" , 0 ), # Legacy format not supported by Godot.
68+ ("BASISD_SUPPORT_PVRTC1" , 0 ), # Legacy format not supported by Godot.
69+ ("BASISD_SUPPORT_PVRTC2" , 0 ), # Legacy format not supported by Godot.
70+ ]
71+ )
72+
5373if env .editor_build :
5474 env_thirdparty .Append (CPPDEFINES = ["BASISU_NO_IMG_LOADERS" ])
5575 env_thirdparty .add_source_files (thirdparty_obj , encoder_sources )
You can’t perform that action at this time.
0 commit comments