blob: 3fdbf09561d7101e40471d0488c9a9582eba444b [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct Out {
float4 x;
float4 y;
float4 z;
};
struct f_outputs {
float4 Out_x [[color(0)]];
float4 Out_y [[color(2)]];
float4 Out_z [[color(4)]];
};
struct f_inputs {
float4 fbf_1 [[color(1)]];
float4 fbf_3 [[color(3)]];
};
Out f_inner(float4 fbf_1, float4 fbf_3) {
return Out{.x=fbf_1, .y=float4(20.0f), .z=fbf_3};
}
fragment f_outputs f(f_inputs inputs [[stage_in]]) {
Out const v = f_inner(inputs.fbf_1, inputs.fbf_3);
return f_outputs{.Out_x=v.x, .Out_y=v.y, .Out_z=v.z};
}