Interleaved indices?

Hello,

My question is pretty straightforward : Is it possible (and how) to use multiple index for interleaved data.
For now my data is stored like this : Vpos1 Norm1 Texcoord1 Vpos2 Norm2 Texcoord2 …
I can draw the model easily with an index buffer but this means that the normal and texcoord are false because they have different indices.
4 2 0 -> Vertex position index
0 0 0 -> Normal index
0 1 2 -> Texcoord index

I am wondering if I could setup a second index buffer or interleave the index data in the current index buffer and just tell vulkan that offset 0 is for location 0, 1 is for location 1 etc

If that is not possible, what is the best way to pass the normals and texcoord in my case ?

No more than you could with OpenGL.

The standard method is to duplicate data so that all vertices have the same indices.

Otherwise, you’re going to have to use SSBOs or buffer views and implement vertex attributes in your shader. That is, use VertexIndex and InstanceIndex to decide how to fetch values from some set of bound resources.

1 Like