SPIRV-Cross/reference/shaders-msl/vert/ubo.vert
Bill Hollings 192bdc9516 CompilerMSL elide unused builtins from entry function input and output structs.
Add Compiler::has_active_builtin() function.
Update test reference shaders that included unused builtins.
2017-05-24 09:31:38 -04:00

31 lines
500 B
GLSL

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct UBO
{
float4x4 mvp;
};
struct main0_in
{
float4 aVertex [[attribute(0)]];
float3 aNormal [[attribute(1)]];
};
struct main0_out
{
float3 vNormal [[user(locn0)]];
float4 gl_Position [[position]];
};
vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _16 [[buffer(0)]])
{
main0_out out = {};
out.gl_Position = _16.mvp * in.aVertex;
out.vNormal = in.aNormal;
return out;
}