Hi!
I'm wondering if it is possible to structure a Vertex Buffer in a SoA approach like this
{ x1, x2, x3 . . . xn, y1, y2, y3 . . . yn, z1, z2, z3 . . . zn }
instead of the traditional AoS approach
{ x1, y1, z1, x2, y2, z2, x3, y3, z3 . . . xn, yn, zn }
If that beeing the case.. Is it possible to design the ID3D11InputLayout
like this?
D3D11_INPUT_ELEMENT_DESC inputDesc[] = {
{ "POSITION", 0, DXGI_FORMAT_R32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "POSITION", 1, DXGI_FORMAT_R32_FLOAT, 0, offsetToY, D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "POSITION", 2, DXGI_FORMAT_R32_FLOAT, 0, offsetToZ, D3D11_INPUT_PER_VERTEX_DATA, 0 }
};
And how does one call the deviceContext->IASetVertexBuffers
correctly with this type of layout?
Any suggestions? Thank you!