5 ms·
Vertex attributes should probably be interleaved anyway.
by tubs 11y ago
Vertex attributes should probably be interleaved anyway.
- ygra 11y agoThe whole point is that they shouldn't, because there are multiple loops over the different attributes and for best performance they should be in individual contiguous memory regions. Remember that you only have a few milliseconds per frame in a game and those things can matter here.
- tubs 11y agoThe two attributes are pos and uv, which are almost always tied to each other (and therefore be updated together). The GPU will access attributes by index hence they should be interleaved otherwise you are just forcing cache misses. Indices are not vertex attributes and thus should not be interleaved with the other data.