#Index Buffer skip every 4th entry when drawing

5 messages · Page 1 of 1 (latest)

dire path
#

My Index Buffer should look like this:
0 1 2 someNumber 3 4 5 someOtherNumber 4 1 2 anotherNumber
I want to assign each face some number which I need to use in a Compute Shader that works on all faces.
I know I could also use a separate buffer for this containing only my special numbers, but I'm still interested if this is somehow possible.

warm dune
novel kernel
#

the index buffer simply expects a list of indices to form triangles (or whatever your topology is), and you can't change much here

you could make someNumber part of the vertex attributes (although that would copy each face 3 times)
a separate buffer is probably the way to go

I don't see why you would want to use the index buffer for this. The index buffer should just contain indices, and only indices.

dire path
#

dusk gulch
#

You would probably need another data structure just for this