1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Allow using more assignment operators on matrixes in shaders

(cherry picked from commit 0f42a29864)
This commit is contained in:
Yuri Roubinsky
2021-08-11 11:50:55 +03:00
committed by Rémi Verschelde
parent 144e0856a4
commit 34f7ceefe0

View File

@@ -1252,7 +1252,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;