Hierarchical Z-Buffer Occlusion Culling Based on Command Buffer
Mingming Wang · 2023
Aiming at the problem that the current HI-Z (Hierarchical Z-Buffer) occlusion culling algorithm has culling errors and occupies too much CPU computing power, this paper proposes a GPU-based occlusion culling method, which performs culling calculations on the GPU and uses Depth buffer to handle accelerated calculations. The algorithm is implemented on the Unity engine. First of all, based on the inspiration of the GPU Instancing optimization method, this paper sets the granularity of occlusion culling to the object level, that is, a single instance. This culling granularity is very suitable for scenes with a large number of repeated objects. Secondly, aiming at the problem of HI -Z acceleration algorithm asynchronously reading back data stuck, this paper introduces the Command buffer and indirect drawing method, and optimizes the elimination process to solve the problem. Finally, the method in this paper is compared with the CPU occlusion culling method of the Unity rendering engine and the HI -Z occlusion culling method of the UE rendering engine. In addition, the method in this paper also solves the rendering error problem that occurs when the camera is running at high speed, showing good application potential.