You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
439 B
24 lines
439 B
uniform half4 colorGreen;
|
|
|
|
float scalar(float x, float y) {
|
|
x = length(x);
|
|
x = distance(x, y);
|
|
x = dot(x, y);
|
|
x = normalize(x);
|
|
return x;
|
|
}
|
|
|
|
float2 vector(float2 x, float2 y) {
|
|
x = length(x).xx;
|
|
x = distance(x, y).xx;
|
|
x = dot(x, y).xx;
|
|
x = normalize(x);
|
|
return x;
|
|
}
|
|
|
|
half4 main(float2 coords) {
|
|
float x = scalar(1, 2);
|
|
float2 y = vector(float2(1, 2), float2(3, 4));
|
|
return colorGreen;
|
|
}
|