diff options
author | reduz <reduzio@gmail.com> | 2021-05-24 21:25:11 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2021-05-31 10:13:09 +0200 |
commit | 0d2e02945b07073ed8c76ca118e36da825c0c1ec (patch) | |
tree | afaf6b4d851ff677d604d4014e9dc39db6d18ea0 /editor/editor_resource_preview.cpp | |
parent | 39df47b88f1ffb9bd8f2f4aab19d6b91b0830523 (diff) | |
download | redot-engine-0d2e02945b07073ed8c76ca118e36da825c0c1ec.tar.gz |
Implement shader caching
* Shader compilation is now cached. Subsequent loads take less than a millisecond.
* Improved game, editor and project manager startup time.
* Editor uses .godot/shader_cache to store shaders.
* Game uses user://shader_cache
* Project manager uses $config_dir/shader_cache
* Options to tweak shader caching in project settings.
* Editor path configuration moved from EditorSettings to new class, EditorPaths, so it can be available early on (before shaders are compiled).
* Reworked ShaderCompilerRD to ensure deterministic shader code creation (else shader may change and cache will be invalidated).
* Added shader compression with SMOLV: https://github.com/aras-p/smol-v
Diffstat (limited to 'editor/editor_resource_preview.cpp')
-rw-r--r-- | editor/editor_resource_preview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 138830cdc6..35cf08b4d7 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -241,7 +241,7 @@ void EditorResourcePreview::_thread() { _preview_ready(item.path + ":" + itos(item.resource->hash_edited_version()), texture, small_texture, item.id, item.function, item.userdata); } else { - String temp_path = EditorSettings::get_singleton()->get_cache_dir(); + String temp_path = EditorPaths::get_singleton()->get_cache_dir(); String cache_base = ProjectSettings::get_singleton()->globalize_path(item.path).md5_text(); cache_base = temp_path.plus_file("resthumb-" + cache_base); |