Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
And my shader is
typedef struct
{
float3 position [[attribute(0)]];
} Vertex;
typedef struct
{
float4 position [[position]];
} ColorInOut;
typedef struct
{
matrix_float4x4 projectionMatrix;
matrix_float4x4 modelViewMatrix;
} Uniforms;
vertex ColorInOut vertex_shader(device Vertex *vertices [[buffer(0)]],
uint vertexId [[vertex_id]],
constant Uniforms & uniforms [[ buffer(1) ]])
{
ColorInOut out;
Vertex in = vertices[vertexId];
float4 position = float4(in.position, 1.0);
out.position = uniforms.projectionMatrix * uniforms.modelViewMatrix * position;
return out;
}
fragment float4 fragment_shader(ColorInOut in [[stage_in]])
{
// Blue
return float4(0, 0, 1, 1);
}