View Full Version : implementing occlusion query/hierarchial depth culling in compute shader

11-24-2015, 05:46 PM
I am looking for the tutorial or procedure for implementing occulsion queries in compute shader. What is the algorithm for this?

11-25-2015, 03:22 AM
Here are a couple of links that I've used and implemented successfully:

I'm using a mixture of both to modify an indirect command buffer by culling based on an entity's bounding sphere sourced from another SSBO (that also contains all the other model data: matrices, materials, etc).
I'd recommend,at first, just flagging occluded entities and checking that flag in the main rendering pass and do something that stands out if the node should be occluded (e.g. scale the model 20 times) so you know that you are occluding correctly.