Hardware Instancing - off by one?

Can someone confirm some odd behavior? It appears that the last hardware instance in a vertexbuffer does not get drawn. I presume that this is because the actual item is drawn?

The end result of this behavior is that, with normal grid/row code, you get double at the first position, and a missing item at the end. If you build the grid backwards, then it works as expected (the last one gets in the buffer gets dropped and it’s about where your starting point is).


Hi @brucewheaton,

I’ve used HW a lot in some current projects, I don’t think I’ve encountered a similar issue.

Are you able to share a simple repro project to take a look?

When I added the feature, I tested it with zero, one, two, three and many items and all worked as expected … check how the feature is supposed to be used here: http://playcanvas.github.io/#graphics/hardware-instancing.html


Not really going to tell if there’s one extra or missing there!

I’ll do a simple example.