• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#include <metal_stdlib>
2#include <simd/simd.h>
3using namespace metal;
4struct Inputs {
5};
6struct Outputs {
7    float4 sk_FragColor [[color(0)]];
8};
9struct Globals {
10    texture2d<float> tex;
11    sampler texSmplr;
12};
13fragment Outputs fragmentMain(Inputs _in [[stage_in]], texture2d<float> tex[[texture(0)]], sampler texSmplr[[sampler(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
14    Globals _globals{tex, texSmplr};
15    (void)_globals;
16    Outputs _out;
17    (void)_out;
18    float3 _skTemp0;
19    float4 a = _globals.tex.sample(_globals.texSmplr, float2(0.0));
20    float4 b = _globals.tex.sample(_globals.texSmplr, (_skTemp0 = float3(0.0), _skTemp0.xy / _skTemp0.z));
21    _out.sk_FragColor = float4(a.xy, b.zw);
22    return _out;
23}
24