Skip to content

Commit

Permalink
Merge pull request #83830 from jsjtxietian/fix-varying-assign-swizzle…
Browse files Browse the repository at this point in the history
…-check

Fix assign with swizzle in shader not doing varying validation check
  • Loading branch information
akien-mga committed Oct 25, 2023
2 parents f7c43a8 + 089e7f4 commit 9f49da2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions servers/rendering/shader_language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9f49da2

Please sign in to comment.