I’ve noticed a strange thing and would like to understand why:
I was using stat scenerendering to troubleshoot some cpu issues with a Vulkan VR project and switched between Preview rendering level: vulkan (mobile) and SM5. Whenever I switched to Vulkan, the amount of draw calls doubles or triples, compared to the same view in SM5 even though occlusion culling was enabled in project settings. This would basically mean that Vulkan renders all objects, even those that are behind a wall. I did a test by placing a wall (cube mesh) in the scene, in front of a bunch of objects and indeed, with Vulkan, the amount of draw calls remained equally high with or without the wall. With Shader Model 5 (which is the default renderer for windows), the wall indeed caused culling to occur and draw call count reduced about 70%.
Eventually after trying out a few things, I found a solution to enable “Support Software Occlusion Culling” in project settings, then setting the “LOD For Occluder Mesh” to 0 (which means enabled) in the mesh Details. Then Vulkan behaves similar to SM5 and walls are actually occluding the view.
However, I don’t understand why I should enable software occlusion culling and set the occlusion LOD for each object to use it as an occluder. Shouldn’t occlusion on large meshes be done by default in Vulkan, similar to ShaderModel 5? I assumed this is default behavior for any GPU. I understand that the Vulkan preview render is more of an emulation and not really used for performance debugging. Perhaps that’s the reason why?