From 04d5626bc0ee8c6d900a9a8fdb63d29e8ec59211 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 14 Jun 2022 12:55:24 +0200 Subject: Disable VRAM compression by default for small textures in Detect 3D This is done to prevent reducing texture quality when it doesn't save much video memory, especially for pixel art. The size threshold can be adjusted in the project settings. To get the previous behavior where textures detected to be used in 3D had their compression mode always set to VRAM, set this to the lowest value (16). --- core/config/project_settings.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/config') diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 12d936d456..7e14ee79f1 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -1246,6 +1246,9 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF_INTERNAL("application/config/features", PackedStringArray()); GLOBAL_DEF_INTERNAL("internationalization/locale/translation_remaps", PackedStringArray()); GLOBAL_DEF_INTERNAL("internationalization/locale/translations", PackedStringArray()); + + GLOBAL_DEF("rendering/textures/vram_compression/minimum_size", 512); + custom_prop_info["rendering/textures/vram_compression/minimum_size"] = PropertyInfo(Variant::INT, "rendering/textures/vram_compression/minimum_size", PROPERTY_HINT_RANGE, "16,16384,1"); } ProjectSettings::~ProjectSettings() { -- cgit v1.2.3