RetroArch/deps/SPIRV-Cross/reference/opt/shaders-msl/vert/basic.for-tess.vert

32 lines
747 B
GLSL

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct UBO
{
float4x4 uMVP;
};
struct main0_out
{
float3 vNormal;
float4 gl_Position;
};
struct main0_in
{
float4 aVertex [[attribute(0)]];
float3 aNormal [[attribute(1)]];
};
kernel void main0(main0_in in [[stage_in]], constant UBO& _16 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint3 spvStageInputSize [[grid_size]], device main0_out* spvOut [[buffer(28)]])
{
device main0_out& out = spvOut[gl_GlobalInvocationID.y * spvStageInputSize.x + gl_GlobalInvocationID.x];
if (any(gl_GlobalInvocationID >= spvStageInputSize))
return;
out.gl_Position = _16.uMVP * in.aVertex;
out.vNormal = in.aNormal;
}