Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / skia / tests / sksl / intrinsics / Refract.metal
1 #include <metal_stdlib>
2 #include <simd/simd.h>
3 using namespace metal;
4 struct Uniforms {
5     half a;
6     half b;
7     half c;
8     half4 d;
9     half4 e;
10 };
11 struct Inputs {
12 };
13 struct Outputs {
14     half4 sk_FragColor [[color(0)]];
15 };
16 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
17     Outputs _out;
18     (void)_out;
19     _out.sk_FragColor.x = (refract(float2(_uniforms.a, 0), float2(_uniforms.b, 0), _uniforms.c).x);
20     _out.sk_FragColor = refract(_uniforms.d, _uniforms.e, _uniforms.c);
21     _out.sk_FragColor.xy = half2(0.5h, -0.86602538824081421h);
22     _out.sk_FragColor.xyz = half3(0.5h, 0.0h, -0.86602538824081421h);
23     _out.sk_FragColor = half4(0.5h, 0.0h, 0.0h, -0.86602538824081421h);
24     return _out;
25 }