2021-08-23 15:00:10 +00:00
|
|
|
uniform half4 testInputs; // -1.25, 0, 0.75, 2.25
|
2021-05-11 14:37:56 +00:00
|
|
|
uniform half4 colorGreen, colorRed;
|
|
|
|
|
|
|
|
half4 main(float2 coords) {
|
2021-08-23 15:00:10 +00:00
|
|
|
const float4 expectedA = half4(-1.0, 0.0, 1.0, 2.0);
|
|
|
|
|
|
|
|
const float4 constVal = half4(-6.75, -0.475, 3.5, 2.5);
|
|
|
|
const float4 expectedB = half4(-7.0, -0.0, 4.0, 2.0);
|
|
|
|
return (roundEven(testInputs.x) == expectedA.x &&
|
|
|
|
roundEven(testInputs.xy) == expectedA.xy &&
|
|
|
|
roundEven(testInputs.xyz) == expectedA.xyz &&
|
|
|
|
roundEven(testInputs.xyzw) == expectedA.xyzw &&
|
|
|
|
roundEven(constVal.x) == expectedB.x &&
|
|
|
|
roundEven(constVal.xy) == expectedB.xy &&
|
|
|
|
roundEven(constVal.xyz) == expectedB.xyz &&
|
|
|
|
roundEven(constVal.xyzw) == expectedB.xyzw) ? colorGreen : colorRed;
|
2021-05-11 14:37:56 +00:00
|
|
|
}
|