1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <metal_stdlib>
using namespace metal;
struct _shade_Input {
float value [[user(locn0)]];
};
struct _shade_Output {
float4 _value [[user(locn0)]];
};
fragment _shade_Output shade(_shade_Input input [[stage_in]]) {
_shade_Output __luma_output;
float3 zero3 = float3(0.0, 0.0, 0.0);
float4 one4 = float4(1.0, 1.0, 1.0, 1.0);
float2 half2 = float2(0.5, 0.5);
float3 full = float3(1.0, 2.0, 3.0);
float x = input.value;
float4 splatted = float4(x, x, x, x);
__luma_output._value = float4(((((zero3.x + one4.x) + half2.x) + full.x) + splatted.x), 0.0, 0.0, 1.0);
return __luma_output;
}