blob: 718ea72f301d33086362d982535d7f2234531341 [file] [log] [blame]
John Kessenich2f21fcc2015-06-17 16:15:09 +00001#version 110
2
3uniform float d;
4uniform vec4 bigColor, smallColor;
5uniform vec4 otherColor;
6
7varying float c;
8
9uniform float threshhold;
10uniform float threshhold2;
11uniform float threshhold3;
12
13uniform float minimum;
14
15varying vec4 BaseColor;
16
17uniform bool b;
18
19void main()
20{
21 vec4 color = BaseColor;
22 vec4 color2;
23
24 color2 = otherColor;
25
26 if (c > d)
27 color += bigColor;
28 else
29 color += smallColor;
30
31 if (color.z < minimum)
32 return;
33
34 color.z++;
35
36 if (color.z > threshhold)
37 discard;
38
39 color++;
40
41 // Two path, different rest
42 if (color.w > threshhold2) {
43 if (color.z > threshhold2)
44 return;
45 else if (b)
46 color.z++;
47 else {
48 if (color.x < minimum) {
49 discard;
50 } else {
51 color++;
52 }
53 }
54 } else {
55 if (b)
56 discard;
57 else
58 return;
59 }
60
61
62 // // Two path, shared rest
63 // if (color.w > threshhold2) {
64 // if (color.z > threshhold2)
65 // return;
66 // else if (b)
67 // color++;
68 // else {
69 // if (color.x < minimum) {
70 // discard;
71 // } else {
72 // color++;
73 // }
74 // }
75 // } else {
76 // if (b)
77 // discard;
78 // else
79 // return;
80 // }
81
82
83 // // One path
84 // if (color.w > threshhold2) {
85 // if (color.z > threshhold2)
86 // return;
87 // else {
88 // if (color.x < minimum) {
89 // discard;
90 // } else {
91 // color++;
92 // }
93 // }
94 // } else {
95 // if (b)
96 // discard;
97 // else
98 // return;
99 // }
100
101 gl_FragColor = color * color2;
102}