Looking to experiment with occlusion culling

Hey everyone I’m looking to learn more about occlusion culling and experiment with what performance benefits it might have. Looking for a sanity check on approaches

  1. Is this best done as a renderpass?
  2. Add new flag to render component for setting occlusion checking
  3. in occlusion pass, box is rendered with no material with occlusion query active
  4. in main renderpass, occlusion flag is checked and if true it is culled (in similar way to frustrum culling etc)
  5. Pray

I’m also assuming it would be handy to have occlusion only objects too (which presumably would always be drawn first to guarantee occlusion).

Thanks in advance

One thing to note is that typically you get results of the occlusion query a frame or two later, so your culling will be a bit behind - objects occasionally popping in.

In the past, I’ve done a very basic CPU occlusion with good results. We’d manually place few large quads in the level. Each frame I’d pick few of those that are near the camera / facing the camera, and use those during culling to see if the bounding box is behind it.

@Leonidas might have some further insights on this, based on Does PlayCanvas support occlusion culling?

1 Like