Merge pull request #28829 from vreon/swizzle-up
Allow constructing larger data types by swizzling
This commit is contained in:
commit
193837a8f5
1 changed files with 6 additions and 0 deletions
|
@ -2968,6 +2968,10 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
|
|||
member_type = DataType(dt - 1);
|
||||
} else if (l == 2) {
|
||||
member_type = dt;
|
||||
} else if (l == 3) {
|
||||
member_type = DataType(dt + 1);
|
||||
} else if (l == 4) {
|
||||
member_type = DataType(dt + 2);
|
||||
} else {
|
||||
ok = false;
|
||||
break;
|
||||
|
@ -3001,6 +3005,8 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
|
|||
member_type = DataType(dt - 1);
|
||||
} else if (l == 3) {
|
||||
member_type = dt;
|
||||
} else if (l == 4) {
|
||||
member_type = DataType(dt + 1);
|
||||
} else {
|
||||
ok = false;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue