Merge pull request #107724 from Chaosus/shader_fix_ternary_samplers
Prevent ternary expression with a sampler types in shaders
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user