diff options
author | Juan Linietsky <reduzio@gmail.com> | 2023-01-25 12:17:11 +0100 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2023-01-30 15:53:23 +0100 |
commit | 28f51ba547722d1283882ec5dee9bcab070bc33e (patch) | |
tree | 81a2ef0bc8aa468876bf5edb65df16e2fcc9f4ee /servers/rendering_server.cpp | |
parent | 17a85973559fae0cd2c33d13c4b53f16cf7419ba (diff) | |
download | redot-engine-28f51ba547722d1283882ec5dee9bcab070bc33e.tar.gz |
Refactor high quality texture import
* Only two texture import modes for low/high quality now:
* S3TC/BPTC
* ETC2/ASTC
* Makes sense given this is the general preferred and most compatible combination in most platforms.
* Removed lossy_quality from VRAM texture compression options. It was unused everywhere.
* Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA).
* Changed MacOS export settings so required texture formats depend on the architecture selected.
This solves the following problems:
* Makes it simpler to import textures as high quality, without having to worry about the specific format used.
* As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
Diffstat (limited to 'servers/rendering_server.cpp')
-rw-r--r-- | servers/rendering_server.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 97907bed48..0c06ba7c26 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -2849,10 +2849,8 @@ RenderingServer::RenderingServer() { } void RenderingServer::init() { - GLOBAL_DEF_RST("rendering/textures/vram_compression/import_bptc", false); - GLOBAL_DEF_RST("rendering/textures/vram_compression/import_s3tc", true); - GLOBAL_DEF_RST("rendering/textures/vram_compression/import_etc", false); - GLOBAL_DEF_RST("rendering/textures/vram_compression/import_etc2", true); + GLOBAL_DEF_RST("rendering/textures/vram_compression/import_s3tc_bptc", OS::get_singleton()->get_preferred_texture_format() == OS::PREFERRED_TEXTURE_FORMAT_S3TC_BPTC); + GLOBAL_DEF_RST("rendering/textures/vram_compression/import_etc2_astc", OS::get_singleton()->get_preferred_texture_format() == OS::PREFERRED_TEXTURE_FORMAT_ETC2_ASTC); GLOBAL_DEF("rendering/textures/lossless_compression/force_png", false); |