summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorYuri Rubinsky <chaosus89@gmail.com>2022-10-16 19:34:12 +0300
committerYuri Rubinsky <chaosus89@gmail.com>2022-10-16 19:55:08 +0300
commit926d4ebb28395d58aad5dde17ac7adcaf95a55d4 (patch)
treec82bc42d0f6a42bf403b6a5d9785c6f7c334d9bf /servers
parent3a59c833f1b7e34ddef57522800288a0dee8562d (diff)
Fix editor crash when assigning some uniform hints to the textures
Diffstat (limited to 'servers')
-rw-r--r--servers/rendering/shader_language.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp
index a92292209f..4d27c400f0 100644
--- a/servers/rendering/shader_language.cpp
+++ b/servers/rendering/shader_language.cpp
@@ -8635,12 +8635,15 @@ Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_f
} break;
case TK_HINT_SCREEN_TEXTURE: {
new_hint = ShaderNode::Uniform::HINT_SCREEN_TEXTURE;
+ --texture_uniforms;
} break;
case TK_HINT_NORMAL_ROUGHNESS_TEXTURE: {
new_hint = ShaderNode::Uniform::HINT_NORMAL_ROUGHNESS_TEXTURE;
+ --texture_uniforms;
} break;
case TK_HINT_DEPTH_TEXTURE: {
new_hint = ShaderNode::Uniform::HINT_DEPTH_TEXTURE;
+ --texture_uniforms;
} break;
case TK_FILTER_NEAREST: {
new_filter = FILTER_NEAREST;