Merge pull request #107724 from Chaosus/shader_fix_ternary_samplers
Prevent ternary expression with a sampler types in shaders
This commit is contained in:
commit
110eb1884c
1 changed files with 1 additions and 1 deletions
|
|
@ -2003,7 +2003,7 @@ bool ShaderLanguage::_validate_operator(const BlockNode *p_block, const Function
|
|||
DataType nb = p_op->arguments[1]->get_datatype();
|
||||
DataType nc = p_op->arguments[2]->get_datatype();
|
||||
|
||||
valid = na == TYPE_BOOL && (nb == nc);
|
||||
valid = na == TYPE_BOOL && (nb == nc) && !is_sampler_type(nb);
|
||||
ret_type = nb;
|
||||
ret_size = sa;
|
||||
} break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue