mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Fix some incorrect conversions which lead to crash in shaders
This commit is contained in:
parent
28d83ecf5a
commit
01950553f2
@ -1137,13 +1137,13 @@ bool ShaderLanguage::_validate_operator(OperatorNode *p_op, DataType *r_ret_type
|
||||
} else if (na == TYPE_FLOAT && nb == TYPE_VEC4) {
|
||||
valid = true;
|
||||
ret_type = TYPE_VEC4;
|
||||
} else if (p_op->op == OP_MUL && na == TYPE_FLOAT && nb == TYPE_MAT2) {
|
||||
} else if (na == TYPE_FLOAT && nb == TYPE_MAT2) {
|
||||
valid = true;
|
||||
ret_type = TYPE_MAT2;
|
||||
} else if (p_op->op == OP_MUL && na == TYPE_FLOAT && nb == TYPE_MAT3) {
|
||||
} else if (na == TYPE_FLOAT && nb == TYPE_MAT3) {
|
||||
valid = true;
|
||||
ret_type = TYPE_MAT3;
|
||||
} else if (p_op->op == OP_MUL && na == TYPE_FLOAT && nb == TYPE_MAT4) {
|
||||
} else if (na == TYPE_FLOAT && nb == TYPE_MAT4) {
|
||||
valid = true;
|
||||
ret_type = TYPE_MAT4;
|
||||
} else if (p_op->op == OP_MUL && na == TYPE_VEC2 && nb == TYPE_MAT2) {
|
||||
@ -1313,13 +1313,13 @@ bool ShaderLanguage::_validate_operator(OperatorNode *p_op, DataType *r_ret_type
|
||||
} else if (na == TYPE_VEC4 && nb == TYPE_FLOAT) {
|
||||
valid = true;
|
||||
ret_type = TYPE_VEC4;
|
||||
} else if (p_op->op == OP_ASSIGN_MUL && na == TYPE_MAT2 && nb == TYPE_VEC2) {
|
||||
} else if (na == TYPE_MAT2 && nb == TYPE_FLOAT) {
|
||||
valid = true;
|
||||
ret_type = TYPE_MAT2;
|
||||
} else if (p_op->op == OP_ASSIGN_MUL && na == TYPE_MAT3 && nb == TYPE_VEC3) {
|
||||
} else if (na == TYPE_MAT3 && nb == TYPE_FLOAT) {
|
||||
valid = true;
|
||||
ret_type = TYPE_MAT3;
|
||||
} else if (p_op->op == OP_ASSIGN_MUL && na == TYPE_MAT4 && nb == TYPE_VEC4) {
|
||||
} else if (na == TYPE_MAT4 && nb == TYPE_FLOAT) {
|
||||
valid = true;
|
||||
ret_type = TYPE_MAT4;
|
||||
} else if (p_op->op == OP_ASSIGN_MUL && na == TYPE_VEC2 && nb == TYPE_MAT2) {
|
||||
|
Loading…
Reference in New Issue
Block a user