You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
421 B
22 lines
421 B
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 fma(half a, half b, half c) {
|
|
return add(mul(a, b), c);
|
|
}
|
|
|
|
half4 main(float2 coords) {
|
|
half a = fma(color.x, color.y, color.z);
|
|
half b = fma(color.y, color.z, color.w);
|
|
half c = fma(color.z, color.w, color.x);
|
|
return half4(a, b, mul(c, c), mul(a, mul(b, c)));
|
|
}
|