blob: d17e3e93ae6c06484d4360c7463979986554d8cb [file] [log] [blame]
uniform half4 color;
half add(half a, half b) {
half c = a + b;
return c;
}
half mul(half a, half b) {
return a * b;
}
half fused_multiply_add(half a, half b, half c) {
return add(mul(a, b), c);
}
half4 main(float2 coords) {
half a = fused_multiply_add(color.x, color.y, color.z);
half b = fused_multiply_add(color.y, color.z, color.w);
half c = fused_multiply_add(color.z, color.w, color.x);
return half4(a, b, mul(c, c), mul(a, mul(b, c)));
}