| 1 |
#include <metal_stdlib> |
| 2 |
#include <simd/simd.h> |
| 3 |
|
| 4 |
using namespace metal; |
| 5 |
|
| 6 |
struct main0_out |
| 7 |
{ |
| 8 |
float4 FragColor [[color(0)]]; |
| 9 |
}; |
| 10 |
|
| 11 |
struct main0_in |
| 12 |
{ |
| 13 |
float3 vUV [[user(locn0)]]; |
| 14 |
}; |
| 15 |
|
| 16 |
fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> uSamp [[texture(0)]], depth2d<float> uSampShadow [[texture(1)]], sampler uSampSmplr [[sampler(0)]], sampler uSampShadowSmplr [[sampler(1)]]) |
| 17 |
{ |
| 18 |
main0_out out = {}; |
| 19 |
out.FragColor = uSamp.gather(uSampSmplr, in.vUV.xy, int2(0), component::x); |
| 20 |
out.FragColor += uSamp.gather(uSampSmplr, in.vUV.xy, int2(0), component::y); |
| 21 |
out.FragColor += uSampShadow.gather_compare(uSampShadowSmplr, in.vUV.xy, in.vUV.z); |
| 22 |
return out; |
| 23 |
} |
| 24 |
|