• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#include <metal_stdlib>
2#include <simd/simd.h>
3using namespace metal;
4struct Uniforms {
5    half4 I;
6    half4 N;
7    half4 colorGreen;
8    half4 colorRed;
9};
10struct Inputs {
11};
12struct Outputs {
13    half4 sk_FragColor [[color(0)]];
14};
15fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
16    Outputs _out;
17    (void)_out;
18    half _skTemp0;
19    half _skTemp1;
20    half expectedX = -49.0h;
21    half2 expectedXY = half2(-169.0h, 202.0h);
22    half3 expectedXYZ = half3(-379.0h, 454.0h, -529.0h);
23    half4 expectedXYZW = half4(-699.0h, 838.0h, -977.0h, 1116.0h);
24    _out.sk_FragColor = (((((((_skTemp0 = _uniforms.I.x, _skTemp1 = _uniforms.N.x, _skTemp0 - 2 * _skTemp1 * _skTemp0 * _skTemp1) == expectedX && all(reflect(_uniforms.I.xy, _uniforms.N.xy) == expectedXY)) && all(reflect(_uniforms.I.xyz, _uniforms.N.xyz) == expectedXYZ)) && all(reflect(_uniforms.I, _uniforms.N) == expectedXYZW)) && -49.0h == expectedX) && all(half2(-169.0h, 202.0h) == expectedXY)) && all(half3(-379.0h, 454.0h, -529.0h) == expectedXYZ)) && all(half4(-699.0h, 838.0h, -977.0h, 1116.0h) == expectedXYZW) ? _uniforms.colorGreen : _uniforms.colorRed;
25    return _out;
26}
27