XNA / DirectX: Should You Always Use Indexes?
I am doing billboards for vegetation where the billboard is of course one quadrant of two triangles. Vertex data is stored in a vertex buffer, but do I need to specify indices? I understand the savings on things like terrain can be huge in terms of vertices sent to the graphics card when using indices, but using indices on billboards means I will have 4 vertices per square, not 6, so like each quad is completely separate from the others.
And is it possible that using indexes actually degrades performance because there is an additional level of indirection? Or does it make no difference at all?
I'm asking this because using indexes will complicate things a bit, and I'm curious to know if I'm doing extra work that only slows things down (both in theory and actually noticeable in practice).
This is using XNA, but it should apply to DirectX.
a source to share
Using indexes not only saves bandwidth, sends less data to the map, but also reduces the amount of work the vertex shader does. Vertex shader results can be cached if an index is used as the key.
If you advertise most of this billing vegetation and don't change your index buffer, I think you should see a small payoff.
a source to share
When it comes to very primitive hemotoria, then it might not make sense to use indices, I won't even bother about performance in this case, even a humble HW will display millions of triangles in seconds.
Now, technically, you don't know how HW will handle the data internally, it can convert it to indexes anyway, because this is the most popular form of geometry representation.
a source to share