summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2022-01-25 21:36:02 +0300
committerGitHub <noreply@github.com>2022-01-25 21:36:02 +0300
commitb82cb79c4e92718c7dca6a501ee2fd876ad1c999 (patch)
treef643daf63eb02e251d48633c1fd196e1c577366e
parentee7c555665b70fc32b56455fa7876ee3987cde9a (diff)
parentb01065b9a425e5a1306b111f6d8a581227192db4 (diff)
Merge pull request #57207 from Chaosus/fix_global_uniforms
-rw-r--r--servers/rendering/shader_language.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp
index f16f66544a..59f9b0c808 100644
--- a/servers/rendering/shader_language.cpp
+++ b/servers/rendering/shader_language.cpp
@@ -7799,7 +7799,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
if (uniform) {
- if (uniform_scope == ShaderNode::Uniform::SCOPE_GLOBAL) {
+ if (uniform_scope == ShaderNode::Uniform::SCOPE_GLOBAL && Engine::get_singleton()->is_editor_hint()) { // Type checking for global uniforms is not allowed outside the editor.
//validate global uniform
DataType gvtype = global_var_get_type_func(name);
if (gvtype == TYPE_MAX) {