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.
28 lines
532 B
28 lines
532 B
uniform half4 colorGreen;
|
|
|
|
noinline half4 multiplyByAlpha(half4 x) {
|
|
return x * x.aaaa;
|
|
}
|
|
|
|
noinline half add(half a, half b) {
|
|
half c = a + b;
|
|
return c;
|
|
}
|
|
|
|
noinline half mul(half a, half b) {
|
|
return a * b;
|
|
}
|
|
|
|
noinline half fma(half a, half b, half c) {
|
|
return add(mul(a, b), c);
|
|
}
|
|
|
|
half4 main(float2 coords) {
|
|
// Functions used multiple times:
|
|
half4 result = fma(colorGreen.a, colorGreen.g, colorGreen.r).0x0x;
|
|
// Functions used only once:
|
|
result = multiplyByAlpha(result);
|
|
|
|
return result;
|
|
}
|