I would like to use some occlusion query techniques to implement a few visual effects, but it seems to be well hidden in Unity.
Can somebody point me to the Occlusion Query API documentation? I’m using Unity 2018.4 and the forward builtin renderer.
I would like to use some occlusion query techniques to implement a few visual effects, but it seems to be well hidden in Unity.
Can somebody point me to the Occlusion Query API documentation? I’m using Unity 2018.4 and the forward builtin renderer.
You mean GPU occlusion queries? AFAIK Unity never supported those. It’s either baked Umbra occlusion or nothing at all.
Yes, I meant GPU occlusion queries. I want to issue an “occlusion query draw-call” and then retrieve how many pixels were actually drawn. I’ve used the XNA OcclusionQuery class in the past, I assumed something like this exists in Unity as well.
What’s baked Umbra occlusion? Do you refer to Unity’s occlusion culling feature?
Unity’s occlusion culling uses a 3rd party middleware called Umbra. It only works for static occluders and requires visibility data to be baked into the scene.
AFAIK GPU occlusion queries are not used and are not exposed via any Unity APIs. You would need to write a native plug-in to use them.
Thanks for the reply!