HZB Regression introduced in 5.6, still in 5.7, breaking many engine features in VR

A regression with with the HZB + VR rendering that was introduced with 5.6 is unfortunately still in 5.7 and not fixed yet. The easiest repro steps are these:

  1. Create a VR template project

  2. Launch VR preview and enable “r.HZBOcclusion 1”

  3. Move your hand in front of the left eye and see objects incorrectly become invisible on the right eye (the right eye incorrectly uses HZB occlusion info from the left eye). If you test the same in 5.5 or even all the way back to 4.27, you won’t see an issue.

This issue actually affects multiple different rendering features since many rendering features in the engine rely on HZB occlusion info, even with r.HZBOcclusion set to 0. For example using an Instanced Static Mesh Component with per-instance GPU LOD selection enabled and r.InstanceCulling.OcclusionCull 1 shows the same issue with instances becoming invisible on the right eye if they are occluded by something on the left eye, because that culling is based on the HZB info. Another engine feature that’s broken by this bug is lightgrid culling, which also is based on the HZB info. There are probably many more engine features also affected by this since the engine uses the HZB for many different things.

1 Like