Since Early-Z/HSR has been popular on mobile platform,what's the benefits of occlusion culling?

I think Early-Z/HSR and occlusion culling are both used for solving the overdraw problem of opaque objects.For example,in the camera frustum,there is a invisible small box totally behind a visible big box.If we using occlusion culling,the small box won’t be rendered.But without occlusion culling,the small box also won’t be rendered because of most phone devices has Early-Z/HSR.So what’s the reason to bake occlusion culling?

With OC, you could get rid of the entire draw call. This mean, you also save the CPU cost of it.
Also, with depth testing, you only save the pixel shading cost. You still have to pay the vertex shading cost.
And finally, this only works when you render front to back. Quite often, sorting is only done for the transparent pass since it is quite expensive. A depth pre-pass can mitigate that issue - but again, it would only save you the pixel shading cost.

2 Likes

Everything is true except the front to back part. The only order that matters is making sure it goes opaque->alpha test->transparent. The deferred part of TBDR means it’s not immediately drawn, but rather all geometry is rasterized first, then pixels are shaded.

But yeah, occlusion culling can still be extremely beneficial on these GPUs, for the reasons stated.

2 Likes

Thanks for pointing that out. I was thinking of desktop GPUs, though. Just noticed that the title was referring to mobile GPUs.

I’m not super familiar with tile-based rendering on mobile GPUs. You don’t happen to have a link that explains TBDR in detail @joshuacwilde ?

By the way, OC can be especially beneficial for animated characters. With OC you can skip the entire cost for animation and skinning. Imagine having a horde of characters outside of a building that you can’t see.

Apple has some good presentations on modern TBDRs. This isn’t the one I was thinking of, but it looks quite good, and the one I was thinking of is on this same site (just don’t remember which one it is exactly) : https://developer.apple.com/videos/play/wwdc2020/10602/

1 Like

Thanks @joshuacwilde ! Appreciate it.

1 Like