diff --git a/drivers/gles3/storage/utilities.cpp b/drivers/gles3/storage/utilities.cpp index 8a9e61c72562..793b3f64f0fc 100644 --- a/drivers/gles3/storage/utilities.cpp +++ b/drivers/gles3/storage/utilities.cpp @@ -355,19 +355,16 @@ bool Utilities::has_os_feature(const String &p_feature) const { if (p_feature == "rgtc") { return config->rgtc_supported; } - if (p_feature == "s3tc") { return config->s3tc_supported; } - if (p_feature == "bptc") { return config->bptc_supported; } if (p_feature == "astc") { return config->astc_supported; } - - if (p_feature == "etc" || p_feature == "etc2") { + if (p_feature == "etc2") { return config->etc2_supported; } diff --git a/editor/editor_property_name_processor.cpp b/editor/editor_property_name_processor.cpp index 5dc211bf5555..a892ea0f85f9 100644 --- a/editor/editor_property_name_processor.cpp +++ b/editor/editor_property_name_processor.cpp @@ -160,7 +160,6 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() { capitalize_string_remaps["dtls"] = "DTLS"; capitalize_string_remaps["eol"] = "EOL"; capitalize_string_remaps["erp"] = "ERP"; - capitalize_string_remaps["etc"] = "ETC"; capitalize_string_remaps["etc2"] = "ETC2"; capitalize_string_remaps["fabrik"] = "FABRIK"; capitalize_string_remaps["fbx"] = "FBX"; diff --git a/editor/export/editor_export_platform_pc.cpp b/editor/export/editor_export_platform_pc.cpp index 42df0d93f62b..413db1595b3d 100644 --- a/editor/export/editor_export_platform_pc.cpp +++ b/editor/export/editor_export_platform_pc.cpp @@ -34,17 +34,13 @@ #include "scene/resources/image_texture.h" void EditorExportPlatformPC::get_preset_features(const Ref &p_preset, List *r_features) const { - if (p_preset->get("texture_format/bptc")) { - r_features->push_back("bptc"); - } - if (p_preset->get("texture_format/s3tc")) { + if (p_preset->get("texture_format/s3tc_bptc")) { r_features->push_back("s3tc"); + r_features->push_back("bptc"); } - if (p_preset->get("texture_format/etc")) { - r_features->push_back("etc"); - } - if (p_preset->get("texture_format/etc2")) { + if (p_preset->get("texture_format/etc2_astc")) { r_features->push_back("etc2"); + r_features->push_back("astc"); } // PC platforms only have one architecture per export, since // we export a single executable instead of a bundle. @@ -60,10 +56,8 @@ void EditorExportPlatformPC::get_export_options(List *r_options) c r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "binary_format/embed_pck"), false)); - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/bptc"), true)); - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), true)); - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc"), false)); - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc2"), false)); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc_bptc"), true)); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc2_astc"), false)); } String EditorExportPlatformPC::get_name() const { @@ -103,6 +97,14 @@ bool EditorExportPlatformPC::has_valid_export_configuration(const Refget("texture_format/s3tc_bptc"); + bool uses_etc2_astc = p_preset->get("texture_format/etc2_astc"); + + if (!uses_s3tc_bptc && !uses_etc2_astc) { + valid = false; + err += TTR("A texture format must be selected to export the project. Please select at least one texture format."); + } + if (!err.is_empty()) { r_error = err; } @@ -237,9 +239,8 @@ void EditorExportPlatformPC::set_logo(const Ref &p_logo) { } void EditorExportPlatformPC::get_platform_features(List *r_features) const { - r_features->push_back("pc"); //all pcs support "pc" - r_features->push_back("s3tc"); //all pcs support "s3tc" compression - r_features->push_back(get_os_name().to_lower()); //OS name is a feature + r_features->push_back("pc"); // Identify PC platforms as such. + r_features->push_back(get_os_name().to_lower()); // OS name is a feature. } void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref &p_preset, HashSet &p_features) { diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index e59bb76ff432..b7f28068b7b8 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -280,7 +280,6 @@ void ProjectSettingsEditor::_add_feature_overrides() { presets.insert("bptc"); presets.insert("s3tc"); - presets.insert("etc"); presets.insert("etc2"); presets.insert("editor"); presets.insert("template_debug"); diff --git a/modules/basis_universal/register_types.cpp b/modules/basis_universal/register_types.cpp index f538fc66760b..c9ea67cb096d 100644 --- a/modules/basis_universal/register_types.cpp +++ b/modules/basis_universal/register_types.cpp @@ -190,9 +190,9 @@ static Ref basis_universal_unpacker_ptr(const uint8_t *p_data, int p_size } else if (RS::get_singleton()->has_os_feature("s3tc")) { format = basist::transcoder_texture_format::cTFBC1; // get this from renderer imgfmt = Image::FORMAT_DXT1; - } else if (RS::get_singleton()->has_os_feature("etc")) { + } else if (RS::get_singleton()->has_os_feature("etc2")) { format = basist::transcoder_texture_format::cTFETC1; // get this from renderer - imgfmt = Image::FORMAT_ETC; + imgfmt = Image::FORMAT_ETC2_RGB8; } else { format = basist::transcoder_texture_format::cTFBGR565; // get this from renderer imgfmt = Image::FORMAT_RGB565; diff --git a/modules/ktx/texture_loader_ktx.cpp b/modules/ktx/texture_loader_ktx.cpp index 155ed56bd089..026c0ce510ba 100644 --- a/modules/ktx/texture_loader_ktx.cpp +++ b/modules/ktx/texture_loader_ktx.cpp @@ -287,7 +287,7 @@ static Ref load_from_file_access(Ref f, Error *r_error) { ktxfmt = KTX_TTF_BC7_RGBA; } else if (RS::get_singleton()->has_os_feature("s3tc")) { ktxfmt = KTX_TTF_BC1_RGB; - } else if (RS::get_singleton()->has_os_feature("etc")) { + } else if (RS::get_singleton()->has_os_feature("etc2")) { ktxfmt = KTX_TTF_ETC1_RGB; } else { ktxfmt = KTX_TTF_RGBA32; diff --git a/platform/linuxbsd/doc_classes/EditorExportPlatformLinuxBSD.xml b/platform/linuxbsd/doc_classes/EditorExportPlatformLinuxBSD.xml index 07378566c3d7..a44c86202e2d 100644 --- a/platform/linuxbsd/doc_classes/EditorExportPlatformLinuxBSD.xml +++ b/platform/linuxbsd/doc_classes/EditorExportPlatformLinuxBSD.xml @@ -57,17 +57,11 @@ - [code]{exe_name}[/code] - Name of application executable. - [code]{cmd_args}[/code] - Array of the command line argument for the application. - - If [code]true[/code], project textures are exported in the BPTC format. + + If [code]true[/code], project textures are exported in the ETC2/ASTC format. - - If [code]true[/code], project textures are exported in the ETC format. - - - If [code]true[/code], project textures are exported in the ETC2 format. - - - If [code]true[/code], project textures are exported in the S3TC format. + + If [code]true[/code], project textures are exported in the S3TC/BPTC format. diff --git a/platform/windows/doc_classes/EditorExportPlatformWindows.xml b/platform/windows/doc_classes/EditorExportPlatformWindows.xml index c483d3380bad..1239a2b32f72 100644 --- a/platform/windows/doc_classes/EditorExportPlatformWindows.xml +++ b/platform/windows/doc_classes/EditorExportPlatformWindows.xml @@ -129,17 +129,11 @@ - [code]{exe_name}[/code] - Name of application executable. - [code]{cmd_args}[/code] - Array of the command line argument for the application. - - If [code]true[/code], project textures are exported in the BPTC format. + + If [code]true[/code], project textures are exported in the ETC2/ASTC format. - - If [code]true[/code], project textures are exported in the ETC format. - - - If [code]true[/code], project textures are exported in the ETC2 format. - - - If [code]true[/code], project textures are exported in the S3TC format. + + If [code]true[/code], project textures are exported in the S3TC/BPTC format. diff --git a/servers/rendering/dummy/storage/utilities.h b/servers/rendering/dummy/storage/utilities.h index 4a640f9594f4..6e8af9afac16 100644 --- a/servers/rendering/dummy/storage/utilities.h +++ b/servers/rendering/dummy/storage/utilities.h @@ -108,7 +108,7 @@ class Utilities : public RendererUtilities { virtual void set_debug_generate_wireframes(bool p_generate) override {} virtual bool has_os_feature(const String &p_feature) const override { - return p_feature == "rgtc" || p_feature == "bptc" || p_feature == "s3tc" || p_feature == "etc" || p_feature == "etc2"; + return p_feature == "rgtc" || p_feature == "bptc" || p_feature == "s3tc" || p_feature == "etc2"; } virtual void update_memory_info() override {} diff --git a/servers/rendering/renderer_rd/storage_rd/utilities.cpp b/servers/rendering/renderer_rd/storage_rd/utilities.cpp index cb035c494c21..8b780a6f7b13 100644 --- a/servers/rendering/renderer_rd/storage_rd/utilities.cpp +++ b/servers/rendering/renderer_rd/storage_rd/utilities.cpp @@ -278,7 +278,7 @@ bool Utilities::has_os_feature(const String &p_feature) const { return true; } - if ((p_feature == "etc" || p_feature == "etc2") && RD::get_singleton()->texture_is_format_supported_for_usage(RD::DATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, RD::TEXTURE_USAGE_SAMPLING_BIT)) { + if (p_feature == "etc2" && RD::get_singleton()->texture_is_format_supported_for_usage(RD::DATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, RD::TEXTURE_USAGE_SAMPLING_BIT)) { return true; }