Keywords: Graphics, Rendering, Occlusion Culling, Depth Testing, Hierarchial Z-Buffer, HZB, Early Z

Depth Testing


Depth testing - OpenGL

Stencil testing - OpenGL

Hierarchial Z-Buffer Occlusion

Principle of HZB Occlusion

Origin: Performance boost on UE4 games for Radeon users - guru3d
HZB Occlusion is a technique supposed to increase performance is a method of rasterizing certain portions of a scene into a depth buffer and then performing image-space occlusion queries on a hierarchical structure constructed from the depth buffer. In any realistic 3D scene, there are things you can see and things that you can’t see. It sounds simple, but the application of this knowledge can have very beneficial effects on the performance of an application billed with rendering the 3D scene in real time. Generally, we want to lower the computational cost of objects that do not contribute to the scene - those objects that are outside our field of view or are obscured by other objects. The Z-buffer is the last stage in the rendering pipeline where an object can be identified as “invisible”; in this case, the object in question is a fragment, and it can only be identified as invisible when the fragment’s depth value is “deeper” than something that has already been rendered at the same raster position. The Z-buffer test is invoked for each and every fragment of a higher-level object being rendered - the polygonal representation of a “thing” in the scene, such as a person, a wall, a car, etc - and thus imposes a rather high computational cost of visibility determination, even with recent optimizations made to hardware z-buffer mechanisms.

Occlusion Culling for UE4 games

Origin: Performance boost on UE4 games for Radeon users - guru3d

This is a simple command that can increase performance by a decent margin, in UE4 games, for Radeon users. All we have to do is open the respective engine.ini for each game and add these lines.


A lot of games using UE4, have this setting at “0”. The reason is probably because this setting at “1” causes a 10% performance loss on NVidia hardware.
So if you are using NVidia, make sure this setting is at “0”. And if you are using AMD, make sure it’s set to “1”.
Ideally, all games would have this setting exposed for each user to decided. Or have some script that would detect an AMD or NVidia GPU and set the value accordingly.
So far, the only game I found that has this option in-game is Supraland Six Feet Under.
Performance gains vary with game and scene, but I tested in a couple of games and found these gains.
High on Life: 7%
Supraland SIU: 12%

Blogs of HZBO

Hierarchical Z-Buffer Occlusion Culling

Hierarchical-Z map based occlusion culling

Research Papers

Image Space Occlusion Culling Image Space Occlusion Culling

Space-Time Hierarchical Occlusion Culling for Micropolygon Rendering with Motion Blur

Visibility Culling using Hierarchical Occlusion Maps

Hierarchical Z-Buffer Visibility

Visibility and Occlusion Culling

Visibility Culling


Software Occlusion Culling

A State-of-the-art (fastest) Software Occlusion ulling System (Recommended)


OpenGL sample for shader-based occlusion culling

Vulkan Conditional Rendering

Vulkan conditional rendering

如果有天堂,应该是图书馆的模样。 -豪尔赫·路易斯·博尔赫斯