blob: 12b721f524ea09c96c975d5ab70d1e842fc9ec20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct buf
{
float4x4 matrix;
float opacity;
};
struct main0_out
{
float4 v_color [[user(locn0)]];
float4 gl_Position [[position]];
};
struct main0_in
{
float4 pos [[attribute(0)]];
float4 color [[attribute(1)]];
};
vertex main0_out main0(main0_in in [[stage_in]], constant buf& ubuf [[buffer(0)]])
{
main0_out out = {};
out.v_color = in.color;
out.gl_Position = ubuf.matrix * in.pos;
return out;
}
|