mirror of
https://github.com/godotengine/godot.git
synced 2025-03-07 23:32:58 +08:00
Merge pull request #51503 from Chaosus/shader_fix_matrix_operators
Allow using more assignment operators on matrixes in shaders
This commit is contained in:
commit
6882280308
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user