| #include <metal_stdlib> |
| using namespace metal; |
| |
| struct Interface { |
| float col1; |
| half col2; |
| float4 pos; |
| }; |
| |
| struct vert_main_outputs { |
| float Interface_col1 [[user(locn1)]]; |
| half Interface_col2 [[user(locn2)]]; |
| float4 Interface_pos [[position]]; |
| }; |
| |
| struct frag_main_inputs { |
| float Interface_col1 [[user(locn1)]]; |
| half Interface_col2 [[user(locn2)]]; |
| }; |
| |
| Interface vert_main_inner() { |
| return Interface{.col1=0.40000000596046447754f, .col2=0.599609375h, .pos=float4(0.0f)}; |
| } |
| |
| void frag_main_inner(Interface colors) { |
| float const r = colors.col1; |
| half const g = colors.col2; |
| } |
| |
| vertex vert_main_outputs vert_main() { |
| Interface const v = vert_main_inner(); |
| return vert_main_outputs{.Interface_col1=v.col1, .Interface_col2=v.col2, .Interface_pos=v.pos}; |
| } |
| |
| fragment void frag_main(frag_main_inputs inputs [[stage_in]], float4 Interface_pos [[position]]) { |
| frag_main_inner(Interface{.col1=inputs.Interface_col1, .col2=inputs.Interface_col2, .pos=Interface_pos}); |
| } |