2018-06-11 08:48:12 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
#include <simd/simd.h>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
|
|
|
|
struct UBO
|
|
|
|
{
|
|
|
|
packed_float3 color;
|
|
|
|
float v;
|
|
|
|
};
|
|
|
|
|
2018-06-12 15:41:35 +00:00
|
|
|
struct main0_out
|
2018-06-11 08:48:12 +00:00
|
|
|
{
|
2018-06-12 15:41:35 +00:00
|
|
|
float FragColor [[color(0)]];
|
2018-06-11 08:48:12 +00:00
|
|
|
};
|
|
|
|
|
2018-06-12 15:41:35 +00:00
|
|
|
struct main0_in
|
2018-06-11 08:48:12 +00:00
|
|
|
{
|
2018-06-12 15:41:35 +00:00
|
|
|
float3 vIn [[user(locn0)]];
|
2018-06-11 08:48:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], constant UBO& _15 [[buffer(0)]])
|
|
|
|
{
|
|
|
|
main0_out out = {};
|
|
|
|
out.FragColor = dot(in.vIn, float3(_15.color));
|
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|