Jump to content
  • Advertisement
Sign in to follow this  
AxeGuywithanAxe

Dynamic GPU Instancing

This topic is 884 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys, I wanted to get other's insight when it comes to gpu instancing. I have a submission stage in my rendering pipeline. In this pipeline I have two options for gpu instancing. The first option is to have some type of "manager" class, that holds all instances of a certain mesh, in this method the manager would cull for each relevant view, and submit an instancing call to the render queue. The second option is to sort the render queue, then create instancing groups based on the index buffer/vertexbuffer/etc.. The benefits of the first method is that it doesn't require much logic by the rendering pipeline. The manager knows how much of each model to render, so it will just submit the commands for rendering. The second method is beneficial because it's more dynamic, but adds more complexity to the render queue , i.e instead of just sorting, you must sort.. then build "instancing groups" based on custom criteria... and then submit the commands.

Share this post


Link to post
Share on other sites
Advertisement

You'll have to specify your API target. With GL 3.3+ / D3D11 / Metal / Vulkan / D3D12 instancing is a walk in the park, it becomes very easy to render multiple instances of multiple meshes with multiple materials with just one draw call (or a few of them).

 

However if you're aiming to D3D9 / GLES3 style, then yeah, it needs more work.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!