Geometry Instancing: What impact on pixel shading?

Acert93

Artist formerly known as Acert93
Legend
GI allows you to replicate a lot of objects without much penalty to the Vertex Shadering performance, but what kind of hit does Pixel Shading performance take? Are there any tricks that ATI and Nvidia do to decrease any PS performance hits taken with a lot of GI objects? Are GI objects AI and physics friendly (like havok/ragdoll)?

Just curious.
 
All GI really is is allowing you to have two input streams at different frequencies with one of them repeating.

The big win is the reduction in drawprim calls, on a PC this is significant.

So in terms of pixel shading it's identical to drawing them all seperately, in terms of ragdoll/physics/AI it depends what you instance. You could provide different matrix sets for each of the instances, so they could all be individually animated.
 
ERP said:
The big win is the reduction in drawprim calls, on a PC this is significant.
The big benefit here boils down to a lot less state changes, is that right?
 
Albuquerque said:
ERP said:
The big win is the reduction in drawprim calls, on a PC this is significant.
The big benefit here boils down to a lot less state changes, is that right?

For the most part it's driver overhead. You will save some write bandwidth from the CPU, but I doubt in a demo scenario it's that significant if the card supports real index buffers.

Drawprimitive is an extremly expensive operation on a PC, they're supposed to fix this in longhorn.

I guess if your drawing a lot of low polygon models it'd be a win even if drawprim was fast just because it limits the required CPU intervention.
[/quote]
 
ERP said:
Drawprimitive is an extremly expensive operation on a PC, they're supposed to fix this in longhorn.
It's an extremely expensive operation in Direct3D, you mean. OpenGL's quite a bit better about this.
 
How about on consoles? What are the advantages there?
Very few. I don't know of any console that protects the OS kernel in a different priviledge level. As such, there is no kernel mode switch needed (as you're always running in kernel mode anyway). So the overhead of a DrawPrimitives() call is much, much lower.

Of course, consoles that use APIs of the OpenGL-variant just don't have this issue at all.
 
DrawPrim on an Xbox is a direct call to a function that copies data directly into the push buffer. i.e. relatively speaking it's cheap (as cheap as any other console API).

Never really done much timing in openGL for small triangle batches, but my guess would be there isn't much in it. i.e it's probably not any cheaper.
 
Geometry instancing is really usefull even on consoles as a efficiant method (both memory and performance wise) of drawing large amounts small instances. For example for undergrowth or debris
 
Alstrong said:
ah.... could you potentially use it for hair too?
I don't see why not. I'm not sure it'd be a great improvement in this case, but it really depends upon what sort of hair we're talking about, I suppose.
 
Geo Instancing lowers processing power needed for separate objects(usually particles or trees in FarCry),but you're still limited by physcal graphic card capabilities (fillrate,triangle count,GPU registers etc...)
 
If you're going for really high-detail stuff, the amount of data unique to each hair strand is going to dwarf the shared data, and so instancing won't really help much at all (it may end up decreasing performance, depending on implementation: with nVidia's there's some extra vertex work that needs to be done when instancing is enabled, making it a hindrance for very large batches).
 
Back
Top