GridVids
Sign in with YouTube

Voxel Occlusion Culling Test 2

Jed037 Jul 23, 2025 16:30
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Don't Miss
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Mark watched
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Hide
Open in popup Open on YouTube
Share video

Share video

Copy the GridVids link or iframe code.

Video link
Iframe code
Iframe content

A lot more stable now with the help of a pre-pass that relaxes voxels a bit to avoid over-occlusion. Usable now without even noticing that the occlusion culling is happening, which is good. Only problem is light leaking in caves as occluded chunks above the surface would get culled during the shadow pass. A fix for this would be to keep the chunks visible but just set their shadow type to "shadow only". Also works with props as well, I just send the software rasterized occlusion depth texture to the GPU and let the compute shader culler also do the occlusion culling. Main difference is that props are treated as a single point in space, instead of considering their culling spheres. This avoids doing the two nested for loops for checking each pixel that makes up the screen-space AABB, which is pretty expensive when you have more than ~50k props visible. You might notice that some of the chunks are not culled when outside the camera's frustum, and that's normal. The unity SRP culler handles frustum culling automatically so they'll get culled before being sent to the GPU. Again, all the code is here on github: https://github.com/jedjoud10/VoxelTerrain/tree/ecs/Runtime/Occlusion https://github.com/jedjoud10/VoxelTerrain/blob/ecs/Runtime/Systems/TerrainOcclusionApplySystem.cs https://github.com/jedjoud10/VoxelTerrain/blob/ecs/Runtime/Systems/TerrainOcclusionRasterizeSystem.cs https://github.com/jedjoud10/VoxelTerrain/blob/ecs/Runtime/Compute/PropsCull.compute#L92-L106
Science & Technology