From 089e7f473dc1d8e5b46f01dee35727a306c3a845 Mon Sep 17 00:00:00 2001 From: jsjtxietian Date: Mon, 23 Oct 2023 17:52:50 +0800 Subject: [PATCH] Fix assign with swizzle in shader not doing varying validation check --- servers/rendering/shader_language.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 41f2fbb03f56..a2da26eb65e9 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -4639,6 +4639,10 @@ bool ShaderLanguage::_validate_assign(Node *p_node, const FunctionInfo &p_functi return false; } + if (shader->varyings.has(var->name)) { + return _validate_varying_assign(shader->varyings[var->name], r_message); + } + if (!(p_function_info.built_ins.has(var->name) && p_function_info.built_ins[var->name].constant)) { return true; }