I have vec2
one containing the x and y coordinates. I need them to be more than 16. My first attempt:
if (gl_FragCoord.xy > 16.0) {
// do something..
}
Unable to compile with "no matching operand" error.
It works if I compare each vector size separately.
if ((gl_FragCoord.x > 16.0) && (gl_FragCoord.y > 16.0))
// do something..
}
Is there a better way to check all elements of a vector at once?
source
share