summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Rubinsky <chaosus89@gmail.com>2022-10-28 09:25:07 +0300
committerGitHub <noreply@github.com>2022-10-28 09:25:07 +0300
commit468762b3b796cff4e3be4e1e02df6c05211c7234 (patch)
tree960301b8574d1bce1a45d2bba8b8ad73aa62a59f
parent9ff3a43a329182ba2fad34263297052c70a4524e (diff)
parent926d4ebb28395d58aad5dde17ac7adcaf95a55d4 (diff)
Merge pull request #67498 from Chaosus/fix_shader_crash
-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;