2018-03-05 15:42:38 +00:00
|
|
|
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
|
|
|
|
|
|
|
#include <metal_stdlib>
|
|
|
|
#include <simd/simd.h>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
|
|
|
|
struct VertexOutput
|
|
|
|
{
|
|
|
|
float4 HPosition;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct TestStruct
|
|
|
|
{
|
2019-05-23 12:54:04 +00:00
|
|
|
float3 position;
|
2018-03-05 15:42:38 +00:00
|
|
|
float radius;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct TestStruct_1
|
|
|
|
{
|
2019-05-23 12:54:04 +00:00
|
|
|
packed_float3 position;
|
2018-03-05 15:42:38 +00:00
|
|
|
float radius;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CB0
|
|
|
|
{
|
2019-10-24 10:22:30 +00:00
|
|
|
TestStruct_1 CB0[16];
|
2018-03-05 15:42:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct main0_out
|
|
|
|
{
|
|
|
|
float4 _entryPointOutput [[color(0)]];
|
|
|
|
};
|
|
|
|
|
2019-09-17 19:11:19 +00:00
|
|
|
static inline __attribute__((always_inline))
|
2020-08-21 14:14:13 +00:00
|
|
|
float4 _main(thread const VertexOutput& IN, constant CB0& _RESERVED_IDENTIFIER_FIXUP_24)
|
2018-03-05 15:42:38 +00:00
|
|
|
{
|
2019-05-23 12:54:04 +00:00
|
|
|
TestStruct st;
|
2020-08-21 14:14:13 +00:00
|
|
|
st.position = float3(_RESERVED_IDENTIFIER_FIXUP_24.CB0[1].position);
|
|
|
|
st.radius = _RESERVED_IDENTIFIER_FIXUP_24.CB0[1].radius;
|
2018-03-05 15:42:38 +00:00
|
|
|
float4 col = float4(st.position, st.radius);
|
|
|
|
return col;
|
|
|
|
}
|
|
|
|
|
2020-08-21 14:14:13 +00:00
|
|
|
fragment main0_out main0(constant CB0& _RESERVED_IDENTIFIER_FIXUP_24 [[buffer(0)]], float4 gl_FragCoord [[position]])
|
2018-03-05 15:42:38 +00:00
|
|
|
{
|
|
|
|
main0_out out = {};
|
|
|
|
VertexOutput IN;
|
|
|
|
IN.HPosition = gl_FragCoord;
|
|
|
|
VertexOutput param = IN;
|
|
|
|
VertexOutput param_1 = param;
|
2020-08-21 14:14:13 +00:00
|
|
|
out._entryPointOutput = _main(param_1, _RESERVED_IDENTIFIER_FIXUP_24);
|
2018-03-05 15:42:38 +00:00
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|