| 1 |
#include <metal_stdlib> |
| 2 |
#include <simd/simd.h> |
| 3 |
|
| 4 |
using namespace metal; |
| 5 |
|
| 6 |
struct VertexOut |
| 7 |
{ |
| 8 |
float4 color; |
| 9 |
float4 color2; |
| 10 |
}; |
| 11 |
|
| 12 |
struct main0_out |
| 13 |
{ |
| 14 |
float4 FragColor [[color(0)]]; |
| 15 |
}; |
| 16 |
|
| 17 |
struct main0_in |
| 18 |
{ |
| 19 |
float4 VertexOut_color [[user(locn2)]]; |
| 20 |
float4 VertexOut_color2 [[user(locn3)]]; |
| 21 |
}; |
| 22 |
|
| 23 |
fragment main0_out main0(main0_in in [[stage_in]]) |
| 24 |
{ |
| 25 |
main0_out out = {}; |
| 26 |
VertexOut inputs = {}; |
| 27 |
inputs.color = in.VertexOut_color; |
| 28 |
inputs.color2 = in.VertexOut_color2; |
| 29 |
out.FragColor = inputs.color + inputs.color2; |
| 30 |
return out; |
| 31 |
} |
| 32 |
|