• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1uniform half4 colorGreen;
2
3noinline half4 multiplyByAlpha(half4 x) {
4    return x * x.aaaa;
5}
6
7noinline half add(half a, half b) {
8    half c = a + b;
9    return c;
10}
11
12noinline half mul(half a, half b) {
13    return a * b;
14}
15
16noinline half fma(half a, half b, half c) {
17    return add(mul(a, b), c);
18}
19
20half4 main(float2 coords) {
21    // Functions used multiple times:
22    half4 result = fma(colorGreen.a, colorGreen.g, colorGreen.r).0x0x;
23    // Functions used only once:
24    result = multiplyByAlpha(result);
25
26    return result;
27}
28