mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-21 08:26:19 +00:00
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
This commit is contained in:
@@ -1793,7 +1793,7 @@ public:
|
||||
p_debug_flags |= DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST;
|
||||
}
|
||||
|
||||
String tmp_export_path = EditorSettings::get_singleton()->get_cache_dir().plus_file("tmpexport." + uitos(OS::get_singleton()->get_unix_time()) + ".apk");
|
||||
String tmp_export_path = EditorPaths::get_singleton()->get_cache_dir().plus_file("tmpexport." + uitos(OS::get_singleton()->get_unix_time()) + ".apk");
|
||||
|
||||
#define CLEANUP_AND_RETURN(m_err) \
|
||||
{ \
|
||||
@@ -2651,7 +2651,7 @@ public:
|
||||
FileAccess *dst_f = nullptr;
|
||||
io2.opaque = &dst_f;
|
||||
|
||||
String tmp_unaligned_path = EditorSettings::get_singleton()->get_cache_dir().plus_file("tmpexport-unaligned." + uitos(OS::get_singleton()->get_unix_time()) + ".apk");
|
||||
String tmp_unaligned_path = EditorPaths::get_singleton()->get_cache_dir().plus_file("tmpexport-unaligned." + uitos(OS::get_singleton()->get_unix_time()) + ".apk");
|
||||
|
||||
#define CLEANUP_AND_RETURN(m_err) \
|
||||
{ \
|
||||
|
||||
Reference in New Issue
Block a user