1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <metal_stdlib>
using namespace metal;
struct _shade_Input {
float2 uv [[user(locn0)]];
float3 normal [[user(locn1)]];
};
struct _shade_Output {
float4 color [[user(locn0)]];
};
fragment _shade_Output shade(_shade_Input input [[stage_in]],
texture2d<float> material_tex_tex [[texture(0)]],
sampler material_tex_samp [[sampler(0)]]) {
_shade_Output __luma_output;
float4 albedo = material_tex_tex.sample(material_tex_samp, input.uv);
__luma_output.color = float4(albedo.rgb, 1.0);
return __luma_output;
}