From 926d4ebb28395d58aad5dde17ac7adcaf95a55d4 Mon Sep 17 00:00:00 2001 From: Yuri Rubinsky Date: Sun, 16 Oct 2022 19:34:12 +0300 Subject: Fix editor crash when assigning some uniform hints to the textures --- servers/rendering/shader_language.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'servers') 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 &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; -- cgit v1.2.3