Skip to content

Commit 110eb18

Browse files
committed
Merge pull request #107724 from Chaosus/shader_fix_ternary_samplers
Prevent ternary expression with a sampler types in shaders
2 parents 4a90220 + d3792ef commit 110eb18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

servers/rendering/shader_language.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ bool ShaderLanguage::_validate_operator(const BlockNode *p_block, const Function
20032003
DataType nb = p_op->arguments[1]->get_datatype();
20042004
DataType nc = p_op->arguments[2]->get_datatype();
20052005

2006-
valid = na == TYPE_BOOL && (nb == nc);
2006+
valid = na == TYPE_BOOL && (nb == nc) && !is_sampler_type(nb);
20072007
ret_type = nb;
20082008
ret_size = sa;
20092009
} break;

0 commit comments

Comments
 (0)