Hello,
I’m using VertexBuffer to generate some vertices.
I’m using a 3rd party library that seems to create “layers” of vertices with the same position.
graphics->SetBlendMode(BLEND_ALPHA);
float* dest = (float*)vertexBuffer_->Lock(0, draw->TotalVertices, true);
for (int i = 0; i < draw->LayerCount; i++)
{
DrawList* dl = draw->Layer[i];
for (int j = 0; j < dl->VertexBuffer.Size(); j++)
{
VertBuffer vb = dl->VertexBuffer[j];
*dest++ = vb.pos.x;
*dest++ = vb.pos.y;
*dest++ = 0.f; // that library doesn't provide any Z coord so I think the issues is here...
... // color
... // uv
}
}
vertexBuffer_->Unlock();
...
When the 3rd party library have 1 layer, everything works correctly but when it have more than 1 I see some artifacts with alpha channel.
Is possible to blend those “layers”?