PDA

View Full Version : Best way to do Geometry Instancing



letslearn
02-27-2012, 11:11 AM
I have heard that instancing is not generally not worth the trouble unless you rendering literally tens of thousands of very simple geometric objects per frame. Well, in my project that is the case. OpenGL 3.3 seems to have built-in support for instanced drawing, but I would like to support more graphics cards/drivers if I can.

Instancing seems to be available much before OpenGL 3 through the use of extensions, but I have not figured out an easy way to see which graphics cards/drivers support which extensions, without actually having physical access to the graphics card.

Is there a particular extension for instancing that is widely implemented on older graphics cards? If not, I suppose I could try implementing instancing with shaders, but is it even worth it at that point?

Alfonse Reinheart
02-27-2012, 11:46 AM
Is there a particular extension for instancing that is widely implemented on older graphics cards?

No. Even EXT_draw_instanced only works on 3.x-class hardware. By the time ARB members bothered to implement instancing, they were already on DX10-class cards, so they didn't bother making versions for DX9-class hardware.

letslearn
02-27-2012, 12:34 PM
Well, thank you for clearing that up.I guess I'll have to find alternative solutions.

aqnuep
02-27-2012, 09:07 PM
Is there a particular extension for instancing that is widely implemented on older graphics cards? If not, I suppose I could try implementing instancing with shaders, but is it even worth it at that point?

You'll need shaders anyway if you plan to use instancing as no matter if you use ARB_draw_instanced or ARB_instanced_arrays you need a shader to perform anything with the instance data.

The only pre-DX10 class GPU I know to support instancing is the Radeon X1000 series that has support for ARB_instanced_arrays.

Btw, from performance point of view, you should better use ARB_instanced_arrays for pre-DX11 class GPUs as instanced vertex attribute arrays usually work faster there (with about 10%) than fetching instance data from texture buffer objects, however for DX11 class GPUs there's no difference anymore.

In case of earlier GPUs you are simply left with performing instancing in "software".