summaryrefslogtreecommitdiffstats
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2020-04-16 23:52:00 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-04-17 12:35:41 -0300
commit0e1c66d9fced8f9d3a8fbd87ddfd2c29a9ed2679 (patch)
tree20628329f16f74383806fecf9e3135816636e6fb /editor/editor_node.cpp
parent30ab5c9baae1cad3e157d906395a4eb8cef77e42 (diff)
downloadredot-engine-0e1c66d9fced8f9d3a8fbd87ddfd2c29a9ed2679.tar.gz
Implement global and per instance shader uniforms.
Adds two keywords to shader language for uniforms: -'global' -'instance' This allows them to reference values outside the material.
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 6f6287ccb5..fddc5dc231 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -708,6 +708,11 @@ void EditorNode::_sources_changed(bool p_exist) {
if (waiting_for_first_scan) {
waiting_for_first_scan = false;
+ // Reload the global shader variables, but this time
+ // loading texures, as they are now properly imported.
+ print_line("done scanning, reload textures");
+ RenderingServer::get_singleton()->global_variables_load_settings(true);
+
// Start preview thread now that it's safe.
if (!singleton->cmdline_export_mode) {
EditorResourcePreview::get_singleton()->start();