2021-08-20 14:10:02 +00:00
|
|
|
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);
|
|
|
|
|
2021-09-30 16:00:09 +00:00
|
|
|
float4 inputVal = float4(testMatrix2x2) * float4(1, 1, -1, -1);
|
2021-08-20 14:10:02 +00:00
|
|
|
uint4 expectedB = uint4(0x3F800000, 0x40000000, 0xC0400000, 0xC0800000);
|
|
|
|
|
|
|
|
return (constVal.x == uintBitsToFloat(expectedA.x) &&
|
|
|
|
constVal.xy == uintBitsToFloat(expectedA.xy) &&
|
|
|
|
constVal.xyz == uintBitsToFloat(expectedA.xyz) &&
|
|
|
|
constVal.xyzw == uintBitsToFloat(expectedA.xyzw) &&
|
2021-09-30 16:00:09 +00:00
|
|
|
inputVal.x == uintBitsToFloat(expectedB.x) &&
|
|
|
|
inputVal.xy == uintBitsToFloat(expectedB.xy) &&
|
|
|
|
inputVal.xyz == uintBitsToFloat(expectedB.xyz) &&
|
|
|
|
inputVal.xyzw == uintBitsToFloat(expectedB.xyzw)) ? colorGreen : colorRed;
|
2021-08-20 14:10:02 +00:00
|
|
|
}
|