5 Years Ago
[D11] some occlusion overhaul, initial version. Occlusion is hooked up to the instancing renderer now. Meshes use OBBs instead of spheres to get tighter occlusion bounds. HiZ samples 4x4 instead of 2x2 to reduce false positives, so less objects pass the occluded objects get drawn. Also does polygon clipping of the OBB to prevent offscreen projection making the NDC box massive, this could be too expensive but it's only clocking 37usec on ps4 on a 4k map. MeshOccludee uses OBBS, ArticulatedOccludee uses AABBS, anything else still uses spheres. todo: memory footprint has been increased over the original version, this could be improved. The pixelshader fallback path has been lost, I could put it back together again if needed. Various things are not being registered with the occlusion system, such as things using MeshCull, and some other stuff to, so these could be added. Some of the other clients of the occlusion system could use tighter bounds, since the system now supports spheres, aabbs and obbs.