Skip to main content
GameDev.net gamedev.net
🔒 Locked

Cost of geometry instancing

Started by GraphicsDude Aug 23, 2011 at 9:32 PM 0 replies 1.4k views
Original Post
GraphicsDude
GraphicsDude
Our renderer here at work does not currently support geometry instancing. We have a separate draw call for all of the models in the scene even if they are exactly the same. I wanted to switch over to using geometry instancing and I'm trying to investigate a little.

Would there be a cost to always do rendering with geometry instancing? Most of our models are unique in the scene so if the system always used the geometry instancing mechanism then most of the time it would only draw one instance. But the way I see it, there is no extra cost other than having to use two vertex streams. Would it be unwise to just always render with geometry instancing on? Maybe the vertex processer incurs more of a hit when fetching per instance data from different stream than the geometry. Will this cause more vertex cache misses?
Digitalfragment
Digitalfragment

Our renderer here at work does not currently support geometry instancing. We have a separate draw call for all of the models in the scene even if they are exactly the same. I wanted to switch over to using geometry instancing and I'm trying to investigate a little.

Would there be a cost to always do rendering with geometry instancing? Most of our models are unique in the scene so if the system always used the geometry instancing mechanism then most of the time it would only draw one instance. But the way I see it, there is no extra cost other than having to use two vertex streams. Would it be unwise to just always render with geometry instancing on? Maybe the vertex processer incurs more of a hit when fetching per instance data from different stream than the geometry. Will this cause more vertex cache misses?


Theres an extra cost in reading in from multiple vertex streams, as theres more data being read per vertex. If your instancing batch structures and shaders are designed well enough, it should be trivial to switch between instanced and non-instanced drawing though.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.