• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1uniform half4 colorGreen, colorRed;
2
3half4 main(float2 coords) {
4    float f = colorGreen.g;
5    int   i = int(colorGreen.g);
6    uint  u = uint(colorGreen.g);
7    bool  b = bool(colorGreen.g);
8
9    float f1 = float(f);
10    float f2 = float(i);
11    float f3 = float(u);
12    float f4 = float(b);
13    int   i1 = int(f);
14    int   i2 = int(i);
15    int   i3 = int(u);
16    int   i4 = int(b);
17    uint  u1 = uint(f);
18    uint  u2 = uint(i);
19    uint  u3 = uint(u);
20    uint  u4 = uint(b);
21    bool  b1 = bool(f);
22    bool  b2 = bool(i);
23    bool  b3 = bool(u);
24    bool  b4 = bool(b);
25
26    return  half(f1) + half(f2) + half(f3) + half(f4) +
27            half(i1) + half(i2) + half(i3) + half(i4) +
28            half(u1) + half(u2) + half(u3) + half(u4) +
29            half(b1) + half(b2) + half(b3) + half(b4) == 16 ? colorGreen : colorRed;
30}
31
32