2021-03-22 15:43:11 +00:00
|
|
|
|
|
|
|
out vec4 sk_FragColor;
|
|
|
|
uniform vec2 ah;
|
|
|
|
uniform vec2 bh;
|
|
|
|
uniform vec2 af;
|
|
|
|
uniform vec2 bf;
|
2021-12-14 16:25:26 +00:00
|
|
|
float cross_length_2d_hh2h2(vec2 a, vec2 b) {
|
2021-03-22 15:43:11 +00:00
|
|
|
return a.x * b.y - a.y * b.x;
|
|
|
|
}
|
2021-12-14 16:25:26 +00:00
|
|
|
float cross_length_2d_ff2f2(vec2 a, vec2 b) {
|
2021-03-22 15:43:11 +00:00
|
|
|
return a.x * b.y - a.y * b.x;
|
|
|
|
}
|
|
|
|
void main() {
|
2021-12-14 16:25:26 +00:00
|
|
|
sk_FragColor.x = cross_length_2d_hh2h2(ah, bh);
|
|
|
|
sk_FragColor.y = cross_length_2d_ff2f2(af, bf);
|
2021-03-22 15:43:11 +00:00
|
|
|
}
|