Skip to content

Commit

Permalink
Merge pull request godotengine#101178 from BlueCube3310/web-high-quality
Browse files Browse the repository at this point in the history
Web: Export ASTC/BPTC compressed textures
  • Loading branch information
akien-mga authored Jan 8, 2025
2 parents a659548 + 84e6ac9 commit 6f3cc27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platform/web/doc_classes/EditorExportPlatformWeb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
</member>
<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 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>
</members>
</class>
2 changes: 2 additions & 0 deletions platform/web/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
if (p_preset->get("vram_texture_compression/for_desktop")) {
r_features->push_back("s3tc");
r_features->push_back("bptc");
}
if (p_preset->get("vram_texture_compression/for_mobile")) {
r_features->push_back("etc2");
r_features->push_back("astc");
}
if (p_preset->get("variant/thread_support").operator bool()) {
r_features->push_back("threads");
Expand Down

0 comments on commit 6f3cc27

Please sign in to comment.