vertex Vertex
line_vertex_main(device Vertex *vertices [[buffer(0)]],
constant Uniforms &uniforms [[buffer(1)]],
uint vid [[vertex_id]])
{
float4x4 matrix = uniforms.matrix;
Vertex in = vertices[vid];
Vertex out;
out.position = matrix * float4(in.position);
out.color = in.color;
return out;
}
fragment float4
line_fragment_main(Vertex inVertex [[stage_in]])
{
return inVertex.color;
}
Цвет неправильный. color(0.9,0.6,0,0.4)
в металле преобразится в странный цвет:
Слева правильно, справа - с металлом
![enter image description here](https://i.stack.imgur.com/43tyN.jpg)
Цвет правильный, когда рисуете металлические треугольники без альфа-цвета,
справа - ничья с металлом .
![enter image description here](https://i.stack.imgur.com/nj9eh.jpg)