In case of per instance data, which Buffer is "generally" faster, vertex Buffer or storage Buffer?

Hey there, I’m trying to figure out the best way to handle per-instance data for things like object transformations and material properties, such as color and textures indices. I’m leaning towards using a vertex buffer, but I’m worried it might not be the most efficient option(talking mainly about performance here), is it okay to store that in a separate vertex buffer or a storage buffer will be better?
Any advice would be greatly appreciated. Thanks a bunch!

Under-the-hood, there is just a “buffer object”. There’s no sub-type associated with the object.

Where vertex (ARRAY), or index (ELEMENT_ARRAY), or SHADER_STORAGE, or DRAW_INDIRECT, or PIXEL_UNPACK, etc. come from is just from different bind targets to which you can attach a buffer object, to use that buffer object for some GL operation. You can in fact bind a given buffer object to multiple bind targets of different types, depending on what you want GL to do with it.

What you’re really asking is, what’s the fastest method for the GPU to read instance data from a buffer object for rendering a list of instances. That’s going to depend on your driver and your usage. Perf is going to depend on more than just the cost of reading that buffer object.

I would start by reading up on instanced rendering and indirect rendering (which can be combined), try some tests, and go from there.

Storage Buffer is the most generic access type there is. If it was “generally” faster, there would be no point in ever using any of the more restricted types.