John Kessenich | 2f21fcc | 2015-06-17 16:15:09 +0000 | [diff] [blame] | 1 | #version 110
|
| 2 |
|
| 3 | uniform float d;
|
| 4 | uniform vec4 bigColor, smallColor;
|
| 5 | uniform vec4 otherColor;
|
| 6 |
|
| 7 | varying float c;
|
| 8 |
|
| 9 | uniform float threshhold;
|
| 10 | uniform float threshhold2;
|
| 11 | uniform float threshhold3;
|
| 12 |
|
| 13 | uniform float minimum;
|
| 14 |
|
| 15 | varying vec4 BaseColor;
|
| 16 |
|
| 17 | uniform bool b;
|
| 18 |
|
| 19 | void 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 | }
|