Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / skia / resources / sksl / intrinsics / IntBitsToFloat.sksl
1 uniform float testInput;
2 uniform float2x2 testMatrix2x2;
3 uniform half4 colorGreen, colorRed;
4
5 half4 main(float2 coords) {
6     const float4 constVal = float4(-1, 0, 1, 2);
7     const int4 expectedA = int4(-0x40800000, 0x00000000, 0x3F800000, 0x40000000);
8
9     float4 inputVal = float4(testMatrix2x2) * float4(1, 1, -1, -1);
10     int4 expectedB = int4(0x3F800000, 0x40000000, -0x3FC00000, -0x3F800000);
11
12     return (constVal.x    == intBitsToFloat(expectedA.x)    &&
13             constVal.xy   == intBitsToFloat(expectedA.xy)   &&
14             constVal.xyz  == intBitsToFloat(expectedA.xyz)  &&
15             constVal.xyzw == intBitsToFloat(expectedA.xyzw) &&
16             inputVal.x    == intBitsToFloat(expectedB.x)    &&
17             inputVal.xy   == intBitsToFloat(expectedB.xy)   &&
18             inputVal.xyz  == intBitsToFloat(expectedB.xyz)  &&
19             inputVal.xyzw == intBitsToFloat(expectedB.xyzw)) ? colorGreen : colorRed;
20 }