CMake-MetalShaderSupport/shader.metal
2024-05-30 04:16:11 -07:00

20 lines
363 B
Metal

#import <metal_stdlib>
using namespace metal;
struct Vertex
{
float4 position [[position]];
float4 color;
};
vertex Vertex vertex_main(const device Vertex *vertices [[buffer(0)]],
uint vid [[vertex_id]])
{
return vertices[vid];
}
fragment float4 fragment_main(Vertex inVertex [[stage_in]])
{
return inVertex.color;
}