diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2021-08-11 13:19:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-11 13:19:00 +0300 |
commit | 688228030850005f84d7b51a527bc779d76b905e (patch) | |
tree | d7655a3db3e5ee53a5cde24d278b4bda2f9cea0b | |
parent | c00303ff55f2a67d5cb1a031070e3b1fe7b15a9e (diff) | |
parent | 0f42a29864336bf76df1418a7d8cc773795eff68 (diff) |
Merge pull request #51503 from Chaosus/shader_fix_matrix_operators
Allow using more assignment operators on matrixes in shaders
-rw-r--r-- | servers/rendering/shader_language.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 8e1d4ffdd5..8db2c30a68 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -1424,7 +1424,7 @@ bool ShaderLanguage::_validate_operator(OperatorNode *p_op, DataType *r_ret_type DataType nb = p_op->arguments[1]->get_datatype(); if (na == nb) { - valid = (na > TYPE_BOOL && na < TYPE_MAT2) || (p_op->op == OP_ASSIGN_MUL && na >= TYPE_MAT2 && na <= TYPE_MAT4); + valid = (na > TYPE_BOOL && na <= TYPE_MAT4); ret_type = na; } else if (na == TYPE_IVEC2 && nb == TYPE_INT) { valid = true; |