2020-09-14 21:30:13 +00:00
|
|
|
|
2020-11-10 16:25:35 +00:00
|
|
|
out vec4 sk_FragColor;
|
2021-02-03 22:44:47 +00:00
|
|
|
uniform vec4 colorGreen;
|
|
|
|
uniform vec4 colorRed;
|
|
|
|
float foo(vec2 v) {
|
|
|
|
return v.x * v.y;
|
2020-12-02 16:53:51 +00:00
|
|
|
}
|
|
|
|
void bar(inout float x) {
|
|
|
|
float y[2];
|
|
|
|
y[0] = x;
|
|
|
|
y[1] = x * 2.0;
|
2021-02-03 22:44:47 +00:00
|
|
|
x = foo(vec2(y[0], y[1]));
|
2020-12-02 16:53:51 +00:00
|
|
|
}
|
2021-02-03 22:44:47 +00:00
|
|
|
vec4 main() {
|
2020-11-10 16:25:35 +00:00
|
|
|
float x = 10.0;
|
2020-12-02 16:53:51 +00:00
|
|
|
bar(x);
|
2021-02-03 22:44:47 +00:00
|
|
|
return x == 200.0 ? colorGreen : colorRed;
|
2020-11-10 16:25:35 +00:00
|
|
|
}
|