2017-08-11 18:54:58 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
#include <simd/simd.h>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
|
|
|
|
struct main0_in
|
|
|
|
{
|
|
|
|
float2 vClip2 [[user(locn2)]];
|
|
|
|
float4 vClip4 [[user(locn1)]];
|
|
|
|
float3 vClip3 [[user(locn0)]];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct main0_out
|
|
|
|
{
|
|
|
|
float FragColor [[color(0)]];
|
|
|
|
};
|
|
|
|
|
2018-01-26 02:06:55 +00:00
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], depth2d<float> uShadow2D [[texture(0)]], texture1d<float> uSampler1D [[texture(1)]], texture2d<float> uSampler2D [[texture(2)]], texture3d<float> uSampler3D [[texture(3)]], sampler uShadow2DSmplr [[sampler(0)]], sampler uSampler1DSmplr [[sampler(1)]], sampler uSampler2DSmplr [[sampler(2)]], sampler uSampler3DSmplr [[sampler(3)]])
|
2017-08-11 18:54:58 +00:00
|
|
|
{
|
|
|
|
main0_out out = {};
|
|
|
|
float4 _20 = in.vClip4;
|
|
|
|
_20.z = in.vClip4.w;
|
|
|
|
out.FragColor = uShadow2D.sample_compare(uShadow2DSmplr, _20.xy / _20.z, in.vClip4.z);
|
|
|
|
out.FragColor = uSampler1D.sample(uSampler1DSmplr, in.vClip2.x / in.vClip2.y).x;
|
|
|
|
out.FragColor = uSampler2D.sample(uSampler2DSmplr, in.vClip3.xy / in.vClip3.z).x;
|
|
|
|
out.FragColor = uSampler3D.sample(uSampler3DSmplr, in.vClip4.xyz / in.vClip4.w).x;
|
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|