I have a game with a ton of instanced, low poly tree’s. There are two performant approaches I can take to rendering this, and I’d like some new eyes on the problem to let me know if I’m missing something obvious. Please let me know if you see anything wrong with my assessment:
-
- View Frustum Culling. Filter out all the tree’s that are out of the players sight using a quadtree, and only send the transforms of the ones in view to the GPU every frame.
- Pros: Less GPU load.
- Cons: A big chunk of instance transform data being transferred through the CPU to GPU bottleneck with every draw call.
-
- Static Instancing. Throw the transforms of every tree in the game to the GPU at the start of the game, and just render them all every frame.
- Pros: No instance transform data needs to be transferred through the bottleneck.
- Cons: Extra GPU load, since I’m rendering all the tree’s all the time.
Both of those cons can be spun as pros: the transform data in view frustum culling is also a pipeline for other data that changes over time (eg. local wind vectors), and rendering all the tree’s all the time means my lag won’t spike when I zoom out to view the entire game map.
Right now I’m using static instancing, which I arrived at after suffering performance problems with view frustum culling, but I’m having trouble doing everything I want to do with that method. My game includes tree’s that grow and die and creatures that eat the tree’s, so I would really benefit from the ability to send a few bits of extra data to the instances every frame.
Essentially: can view frustum culling can be performed with less load on the CPU to GPU pipeline?