If I'm understanding things correctly (please correct me if I'm wrong):
- All modern graphics APIs (vulkan, dx12, metal, webgpu) provide ways to bundle and replay draw calls. The bundle includes which vertices + indices for all bundled draw calls, so frame to frame you're not changing which triangles are drawn in the bundle. This saves a ton of CPU work.
- With frustum/occlusion culling, each frame, you would typically test each object against the view pyramid and skip the draw calls for objects that are outside the view.
How should these work together? With bundling, you lose the fine-grain ability to decide which sets of triangles to draw, so how do you achieve frustum culling?
The only option I can think of is to have many bundles, ideally of co-located objects, and maintain some bounding volume for the whole bundle and frustum cull at the bundle level.
But it seems difficult to maintain co-located sets of objects. Are the bundles anchored to a region of space and objects move in and out of that bundle? That seems like it'd cause a lot of rebundling.
How do people solve this, or what part of the problem am I misunderstanding?
Edit, more context: I'm building my first renderer using WebGPU which calls this "bundling"[0][1] and since this sits on top of {DX12,Metal,Vulkan}, I assume all these APIs can implement this. My understanding is that bundling is one of the big performance wins in webgpu over webgl. (Note: there doesn't seem to be a webgpu tag on this site yet.)
[0] https://gpuweb.github.io/gpuweb/#bundles
[1] https://austin-eng.com/webgpu-samples/samples/animometer (Chrome only; see "bundle" option)