blob: 2fae432b4a5494acf47242966f921fd931b0409c [file] [log] [blame]
uniform float testInput;
uniform float2x2 testMatrix2x2;
uniform half4 colorGreen, colorRed;
half4 main(float2 coords) {
const float4 constVal = float4(-1, 0, 1, 2);
const uint4 expectedA = uint4(0xBF800000, 0x00000000, 0x3F800000, 0x40000000);
float4 inputVal = float4(testMatrix2x2) * float4(1, 1, -1, -1);
const uint4 expectedB = uint4(0x3F800000, 0x40000000, 0xC0400000, 0xC0800000);
return (floatBitsToUint(constVal.x) == expectedA.x &&
floatBitsToUint(constVal.xy) == expectedA.xy &&
floatBitsToUint(constVal.xyz) == expectedA.xyz &&
floatBitsToUint(constVal.xyzw) == expectedA.xyzw &&
floatBitsToUint(inputVal.x) == expectedB.x &&
floatBitsToUint(inputVal.xy) == expectedB.xy &&
floatBitsToUint(inputVal.xyz) == expectedB.xyz &&
floatBitsToUint(inputVal.xyzw) == expectedB.xyzw) ? colorGreen : colorRed;
}