2020-09-15 14:10:43 +00:00
|
|
|
|
2020-09-15 20:09:11 +00:00
|
|
|
out vec4 sk_FragColor;
|
|
|
|
uniform vec4 color;
|
2021-03-15 18:30:06 +00:00
|
|
|
vec4 switchy(vec4 c) {
|
|
|
|
vec4 result;
|
|
|
|
switch (int(c.x)) {
|
2020-12-15 20:21:03 +00:00
|
|
|
case 1:
|
2021-03-15 18:30:06 +00:00
|
|
|
result = c.yyyy;
|
2020-12-15 20:21:03 +00:00
|
|
|
break;
|
|
|
|
default:
|
2021-03-15 18:30:06 +00:00
|
|
|
result = c.zzzz;
|
2020-12-15 20:21:03 +00:00
|
|
|
break;
|
2020-09-15 14:10:43 +00:00
|
|
|
}
|
2021-03-15 18:30:06 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
void main() {
|
|
|
|
sk_FragColor = switchy(color);
|
2020-09-15 14:10:43 +00:00
|
|
|
}
|