2021-05-26 02:45:07 +00:00
|
|
|
uniform half4 input;
|
|
|
|
uniform half4 colorGreen, colorRed;
|
|
|
|
|
|
|
|
half4 main(float2 coords) {
|
|
|
|
const half4 constVec = half4(20, 0, 0, 0);
|
|
|
|
half4 expectedVec = half4(1, 0, 0, 0);
|
|
|
|
|
|
|
|
return (normalize(input.x) == expectedVec.x &&
|
|
|
|
normalize(input.xy) == expectedVec.xy &&
|
|
|
|
normalize(input.xyz) == expectedVec.xyz &&
|
|
|
|
normalize(input.xyzw) == expectedVec.xyzw &&
|
|
|
|
normalize(constVec.x) == expectedVec.x &&
|
|
|
|
normalize(constVec.yx) == expectedVec.yx &&
|
|
|
|
normalize(constVec.zxy) == expectedVec.zxy &&
|
|
|
|
normalize(constVec.xyzw) == expectedVec.xyzw) ? colorGreen : colorRed;
|
2020-12-30 19:53:17 +00:00
|
|
|
}
|