I have a single scene (Level) which contains multiple “worlds”. I want to simply teleport to each world when an event occurs. But before the player visits these worlds, I want them to be hidden (occluded).
So far so good.
The problem:
Even when large portions of the level is occluded by a wall (or something else) my performance is still very low (Specifically the draw calls it seems). HZB is enabled therefore all other objects should be occluded (thus no performance hit) but that doesn’t seem to be the case.
Early Z culling can only do so much (and depends a lot on the specifics of hardware and scene.) If you use the various performance tools, what do they say the problem is?
Put some pre-computed visibility volumes on your scene, and build visibility, and see if it helps?
An alternative might be to just turn off “visible in game” on all objects the player isn’t supposed to see, when the level loads, and then each time the player moves, for example using a trigger volume.
If that still doesn’t work, sub-level streaming would be the next approach.