Does ternary work for that? Inigo is saying "if ternary is working, leave it as ternary". I think you're talking about a situation where ternary wouldn't work, so Inigo isn't saying anything about that situation.
So what? That’s a language convenience, not a performance feature. Calling mix with a vec4 is no faster than using 4 scalar mix calls, and possibly much slower than using 4 ternaries. If your x & y params are expensive functions, and you use a vector of booleans, then you might be really shooting yourself in the foot.
Thorrez|1 year ago
dahart|1 year ago