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;
|
2021-08-23 17:52:17 +00:00
|
|
|
float foo_ff2(const vec2 v) {
|
2021-02-03 22:44:47 +00:00
|
|
|
return v.x * v.y;
|
2020-12-02 16:53:51 +00:00
|
|
|
}
|
2021-03-22 15:43:11 +00:00
|
|
|
void bar_vf(inout float x) {
|
2020-12-02 16:53:51 +00:00
|
|
|
float y[2];
|
|
|
|
y[0] = x;
|
|
|
|
y[1] = x * 2.0;
|
2021-03-22 15:43:11 +00:00
|
|
|
x = foo_ff2(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;
|
2021-03-22 15:43:11 +00:00
|
|
|
bar_vf(x);
|
2021-02-03 22:44:47 +00:00
|
|
|
return x == 200.0 ? colorGreen : colorRed;
|
2020-11-10 16:25:35 +00:00
|
|
|
}
|