2021-05-26 02:04:12 +00:00
|
|
|
uniform half4 inputA, inputB;
|
|
|
|
uniform half4 colorGreen, colorRed;
|
|
|
|
|
|
|
|
half4 main(float2 coords) {
|
|
|
|
const half4 constValA = half4(1, 2, 3, 4);
|
|
|
|
const half4 constValB = half4(5, 6, 7, 8);
|
|
|
|
half4 expected = half4(5, 17, 38, 70);
|
|
|
|
|
|
|
|
return (dot(inputA.x, inputB.x) == expected.x &&
|
|
|
|
dot(inputA.xy, inputB.xy) == expected.y &&
|
|
|
|
dot(inputA.xyz, inputB.xyz) == expected.z &&
|
|
|
|
dot(inputA.xyzw, inputB.xyzw) == expected.w &&
|
|
|
|
dot(constValA.x, constValB.x) == expected.x &&
|
|
|
|
dot(constValA.xy, constValB.xy) == expected.y &&
|
|
|
|
dot(constValA.xyz, constValB.xyz) == expected.z &&
|
|
|
|
dot(constValA.xyzw, constValB.xyzw) == expected.w) ? colorGreen : colorRed;
|
2020-12-30 19:53:17 +00:00
|
|
|
}
|