branchsbox/gpu-occlusion-culling2cancel
7 Commits over 0 Days - ∞cph!
Clean up, only apply culling if enabled
https://files.facepunch.com/alexguthrie/1b1811b1/sbox-dev_f0PdSpDS9b.mp4
Cache all gameobject bounds, fit parent bounds to children
Readback runs callback, applies culling to sceneobject (tho we should really apply this per-view)
Rather than clamping to viewport, if all corners of bbox are off-screen, cull the object
Cache GameObject bounds
Fix a few things inside occlusion culling render layer
Wrap occlusion objects inside a record
Remove more native occlusion culling stuff
Initial
Use spheres so we only have to send a single list of vec4s over
Gather objects
Split logic into COcclusionCullingStandard
Change order, gather correctly, readback, count visible + culled objects
Reject occluded objects, tweak gather & shader
Improved gather, only select the objects we want
Shader re-write, output object depth and buffer depth for debug
Put debug spew behind convar, tweak shader
Tidy up, add CSceneObjectCullingData, add user-controllable per-camera toggle for occlusion culling
Stash shader before I re-write to use AABB
Switch to using bboxes for slightly more accurate results, hi-z mip checks
Start moving all this over to managed, we can benefit from various things here
Initial
Use spheres so we only have to send a single list of vec4s over
Gather objects
Split logic into COcclusionCullingStandard
Change order, gather correctly, readback, count visible + culled objects
Reject occluded objects, tweak gather & shader
Improved gather, only select the objects we want
Shader re-write, output object depth and buffer depth for debug
Put debug spew behind convar, tweak shader
Tidy up, add CSceneObjectCullingData, add user-controllable per-camera toggle for occlusion culling
Stash shader before I re-write to use AABB
Switch to using bboxes for slightly more accurate results, hi-z mip checks