Welcome to mirror list, hosted at ThFree Co, Russian Federation.

helper-invocation.msl21.frag « frag « shaders-msl « opt « reference - github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a833fa0869ba95ac8b04d5e3a7755019f0488808 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <metal_stdlib>
#include <simd/simd.h>

using namespace metal;

struct main0_out
{
    float4 FragColor [[color(0)]];
};

struct main0_in
{
    float2 vUV [[user(locn0)]];
};

fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> uSampler [[texture(0)]], sampler uSamplerSmplr [[sampler(0)]])
{
    main0_out out = {};
    bool gl_HelperInvocation = simd_is_helper_thread();
    float4 _52;
    if (!gl_HelperInvocation)
    {
        _52 = uSampler.sample(uSamplerSmplr, in.vUV, level(0.0));
    }
    else
    {
        _52 = float4(1.0);
    }
    out.FragColor = _52;
    return out;
}