GLSL <> operadores en un vec4
Estoy viendo un código GLSL más nuevo que no se compila con mi versión actual de OpenGL y me pregunto qué significa la forma abreviada de lo siguiente:
vec4 base;
if (base < 0.5) {
result = (2.0 * base * blend);
}
¿Es esto equivalente a:
if (base.r < 0.5 && base.g < 0.5 && base.b < 0.5 && base.a < 0.5) {
result.r = 2.0 * base.r * blend.r;
result.g = 2.0 * base.g * blend.g;
result.b = 2.0 * base.b * blend.b;
result.a = 2.0 * base.a * blend.a;
}
Editar
Error:
Fragment shader failed to compile with the following errors:
Wrong operand types no operation '<' exists that takes a left-hand operand of type 'highp 3-component vector of float' and a right operand of type 'const float' (or there is no acceptable conversion)
También he intentado:
(base.rgb < vec3(0.5))
... Wrong operand types no operation '<' exists that takes a left-hand operand of type 'highp 3-component vector of float' and a right operand of type 'const highp 3-component vector of float'
Supongo que esto se debe a que estoy usando GLSL 1.2. ATI Radeon 3450