diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2021-01-10 10:52:30 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2021-01-10 10:52:30 +0300 |
commit | 289cc89a3953e117e4ee188a9535af89d2602c8c (patch) | |
tree | d1ce1cc15f4fa7f067dff339adcc2b3d78aa42d4 /servers/rendering | |
parent | 98ccaa1bad97bdb83b2afd6a4df6f7a392745592 (diff) |
Prevent crash due to assigning incorrect order of instance uniform
Diffstat (limited to 'servers/rendering')
-rw-r--r-- | servers/rendering/shader_language.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 0cb9220bb3..2fa3355d2f 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -6305,7 +6305,9 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct } uniform2.texture_order = -1; - uniform2.order = uniforms++; + if (uniform_scope != ShaderNode::Uniform::SCOPE_INSTANCE) { + uniform2.order = uniforms++; + } } uniform2.type = type; uniform2.scope = uniform_scope; |