From 0e1c66d9fced8f9d3a8fbd87ddfd2c29a9ed2679 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 16 Apr 2020 23:52:00 -0300 Subject: 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. --- editor/editor_node.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'editor/editor_node.cpp') 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(); -- cgit v1.2.3