summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_export.cpp32
-rw-r--r--editor/editor_export.h3
-rw-r--r--editor/import/resource_importer_layered_texture.cpp7
-rw-r--r--editor/import/resource_importer_texture.cpp7
-rw-r--r--editor/project_settings_editor.cpp1
5 files changed, 5 insertions, 45 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 014e27ae15..f97973ce5d 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1501,36 +1501,12 @@ void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, in
}
String EditorExportPlatform::test_etc2() const {
- // String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
- // bool etc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc");
- // bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2");
- String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
- bool etc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc");
- bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2");
-
- if (driver == "opengl3" && !etc_supported) {
- return TTR("Target platform requires 'ETC' texture compression for OpenGL. Enable 'Import Etc' in Project Settings.");
- } else if (driver == "vulkan" && !etc2_supported) {
- // FIXME: Review if this is true for Vulkan.
- return TTR("Target platform requires 'ETC2' texture compression for Vulkan. Enable 'Import Etc 2' in Project Settings.");
- }
- return String();
-}
+ const bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2");
-String EditorExportPlatform::test_etc2_or_pvrtc() const {
- String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
- bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2");
- bool pvrtc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc");
- // String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
- // bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2");
- // bool pvrtc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc");
-
- if (driver == "opengl3" && !pvrtc_supported) {
- return TTR("Target platform requires 'PVRTC' texture compression for OpenGL. Enable 'Import Pvrtc' in Project Settings.");
- } else if (driver == "vulkan" && !etc2_supported && !pvrtc_supported) {
- // FIXME: Review if this is true for Vulkan.
- return TTR("Target platform requires 'ETC2' or 'PVRTC' texture compression for Vulkan. Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings.");
+ if (!etc2_supported) {
+ return TTR("Target platform requires 'ETC2' texture compression. Enable 'Import Etc 2' in Project Settings.");
}
+
return String();
}
diff --git a/editor/editor_export.h b/editor/editor_export.h
index 3d46ae1996..796fb12793 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -269,8 +269,7 @@ public:
virtual Error run(const Ref<EditorExportPreset> &p_preset, int p_device, int p_debug_flags) { return OK; }
virtual Ref<Texture2D> get_run_icon() const { return get_logo(); }
- String test_etc2() const; //generic test for etc2 since most platforms use it
- String test_etc2_or_pvrtc() const; // test for etc2 or pvrtc support for iOS
+ String test_etc2() const;
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const = 0;
virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const = 0;
diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp
index 5876d6df0b..7ca61e83e7 100644
--- a/editor/import/resource_importer_layered_texture.cpp
+++ b/editor/import/resource_importer_layered_texture.cpp
@@ -450,12 +450,6 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
formats_imported.push_back("etc2");
}
- if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc")) {
- _save_tex(slices, p_save_path + ".etc2." + extension, compress_mode, lossy, Image::COMPRESS_ETC2, csource, used_channels, mipmaps, true);
- r_platform_variants->push_back("pvrtc");
- formats_imported.push_back("pvrtc");
- }
-
if (!ok_on_pc) {
EditorNode::add_io_error("Warning, no suitable PC VRAM compression enabled in Project Settings. This texture will not display correctly on PC.");
}
@@ -481,7 +475,6 @@ const char *ResourceImporterLayeredTexture::compression_formats[] = {
"s3tc",
"etc",
"etc2",
- "pvrtc",
nullptr
};
String ResourceImporterLayeredTexture::get_import_settings_string() const {
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index 59550a3ee3..af4c2625c3 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -556,12 +556,6 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
formats_imported.push_back("etc");
}
- if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc")) {
- _save_stex(image, p_save_path + ".pvrtc.stex", compress_mode, lossy, Image::COMPRESS_PVRTC1_4, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, true, mipmap_limit, normal_image, roughness_channel);
- r_platform_variants->push_back("pvrtc");
- formats_imported.push_back("pvrtc");
- }
-
if (!ok_on_pc) {
EditorNode::add_io_error("Warning, no suitable PC VRAM compression enabled in Project Settings. This texture will not display correctly on PC.");
}
@@ -586,7 +580,6 @@ const char *ResourceImporterTexture::compression_formats[] = {
"s3tc",
"etc",
"etc2",
- "pvrtc",
nullptr
};
String ResourceImporterTexture::get_import_settings_string() const {
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 1bf6243bcc..bea3f90f94 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -215,7 +215,6 @@ void ProjectSettingsEditor::_add_feature_overrides() {
presets.insert("s3tc");
presets.insert("etc");
presets.insert("etc2");
- presets.insert("pvrtc");
presets.insert("debug");
presets.insert("release");
presets.insert("editor");