1#include <metal_stdlib> 2#include <simd/simd.h> 3 4using namespace metal; 5 6struct UBO 7{ 8 float4x4 mvp; 9}; 10 11struct main0_out 12{ 13 float3 vNormal [[user(locn0)]]; 14 float4 gl_Position [[position]]; 15}; 16 17struct main0_in 18{ 19 float4 aVertex [[attribute(0)]]; 20 float3 aNormal [[attribute(1)]]; 21}; 22 23vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _16 [[buffer(0)]]) 24{ 25 main0_out out = {}; 26 out.gl_Position = _16.mvp * in.aVertex; 27 out.vNormal = in.aNormal; 28 return out; 29} 30 31