Progress
Zooid Engine
In October, I implemented Depth Pre-Pass into the Deferred rendering. With Depth Pre-Pass, the result can be used to make GPU occlusion queries. The queries are simply asking whether the object should be rendered or not.
How it works is by sending the draw to GPU and ask if any fragment passed. Instead of passing the model itself, passing a simple bounding box would be enough. Of course, the query can be false positive but in very rare cases (well, depending on the scene setup). Better than occluding something that should be rendered.
Besides the objects, I also implement a query for Light frustum, whether we should process the light or part of the light. The occlusion query for the light frustum helps for reducing shadow maps generation load. For example, directional light has four cascaded shadow maps based on distance from the camera. Instead of generating all four shadow maps, we can check the last three cascade shadow frustum against the scene depth. If the frustum query is failed, then we don’t need to generate the shadow maps for that frustum. Let’s say, the camera looking closely into a curtain, generating shadow maps behind the curtain is really a waste of time and the player can’t see any shadow behind the curtain anyway.
Read More