Skip to content

Frustum Culling#223

Open
MaherRayes wants to merge 7 commits intoaras-p:mainfrom
MaherRayes:Frustum-Culling
Open

Frustum Culling#223
MaherRayes wants to merge 7 commits intoaras-p:mainfrom
MaherRayes:Frustum-Culling

Conversation

@MaherRayes
Copy link

Hi,

this is an implementation of frustum culling for the plugin. It basically follows Aras's post.

  • Mainly I added a kernel ( CSCullFrustum ) that finds splats outside the frustum of the camera and culls them.
  • It also takes into account splats with centers outside the frustum that still appear inside it by calculating a conservative scale value.
  • It rewrites visible splats into the sort key buffer and writes the count into a new buffer that will be passed to following kernels indirectly.
  • I had to change the order of the kernels so the CalcView is done before sorting. The reason is since I'm reusing the sort key buffer to store the remaining splats, if I use CalcView after sorting the splats the latency of pulling sorted splats is very high due to memory locality and it impacts the performance. Thankfully, CalcView doesn't depend on sorting kernel so it doesn't impact the results.

These are the main changes. However, since the key buffer is dynamic now I had to change a lot of the code to support indirect dispatching/drawing.

Results:

It is hard to quantify the uplift but I do currently get +20-50% performance in a room scene (2.4M + 200k splats with quality "very high") based on the angle I'm looking at. Obviously the less splats on camera the more the performance. For worst-case scenario I placed the camera outside the room looking at the entire splat and it seems to generally have the same performance. Tested on a 3080 12G. It worked also on an intel ultra 5 235u integrated graphics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant