1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Merge pull request #101178 from BlueCube3310/web-high-quality

Web: Export ASTC/BPTC compressed textures
This commit is contained in:
Rémi Verschelde
2025-01-08 21:48:13 +01:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -87,10 +87,10 @@
If [code]false[/code], the exported game will not support threads. As a result, it is more prone to performance and audio issues, but will only require to be run on an HTTPS website. If [code]false[/code], the exported game will not support threads. As a result, it is more prone to performance and audio issues, but will only require to be run on an HTTPS website.
</member> </member>
<member name="vram_texture_compression/for_desktop" type="bool" setter="" getter=""> <member name="vram_texture_compression/for_desktop" type="bool" setter="" getter="">
If [code]true[/code], allows textures to be optimized for desktop through the S3TC algorithm. If [code]true[/code], allows textures to be optimized for desktop through the S3TC/BPTC algorithm.
</member> </member>
<member name="vram_texture_compression/for_mobile" type="bool" setter="" getter=""> <member name="vram_texture_compression/for_mobile" type="bool" setter="" getter="">
If [code]true[/code] allows textures to be optimized for mobile through the ETC2 algorithm. If [code]true[/code] allows textures to be optimized for mobile through the ETC2/ASTC algorithm.
</member> </member>
</members> </members>
</class> </class>

View File

@@ -338,9 +338,11 @@ Error EditorExportPlatformWeb::_build_pwa(const Ref<EditorExportPreset> &p_prese
void EditorExportPlatformWeb::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const { void EditorExportPlatformWeb::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
if (p_preset->get("vram_texture_compression/for_desktop")) { if (p_preset->get("vram_texture_compression/for_desktop")) {
r_features->push_back("s3tc"); r_features->push_back("s3tc");
r_features->push_back("bptc");
} }
if (p_preset->get("vram_texture_compression/for_mobile")) { if (p_preset->get("vram_texture_compression/for_mobile")) {
r_features->push_back("etc2"); r_features->push_back("etc2");
r_features->push_back("astc");
} }
if (p_preset->get("variant/thread_support").operator bool()) { if (p_preset->get("variant/thread_support").operator bool()) {
r_features->push_back("threads"); r_features->push_back("threads");