diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-06-14 12:55:24 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-06-14 13:08:20 +0200 |
commit | 04d5626bc0ee8c6d900a9a8fdb63d29e8ec59211 (patch) | |
tree | 72223649decd2070b56555b523c810855363c7cc /core/config | |
parent | 706dc74e01e1900af947d7a5fe854603a3df18b1 (diff) |
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).
Diffstat (limited to 'core/config')
-rw-r--r-- | core/config/project_settings.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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() { |