Occlusion Culling by Hierarchical Depth Buffer and two-pass renderer is an efficient way to perform occlusion culling. Each frame, a pyramid of max values is built by gathering 4 sample values from neighbors. For each mip level I, a texel stores the maximum depth value of its corresponding 4 texels in mip I – 1.
In the early pass, renderers handle all objects visible in the last frame and write to the depth buffer. In the second pass, we test if any object that was not visible earlier is visible now by comparing the Z coordinate of a (very roughly) bounding sphere projected in image space. The width of the projected bounding sphere is used to determine the LOD level to sample from the hierarchy.
This scene is a bit extreme and it probably should cull much more, may be some issues with approximated bounding spheres.
#Vulkan #graphics #shader #opengl #directx #gamedevjobs
Ещё видео!