Added GPU Sorting to SplatRenderer.resort().#45
Conversation
#Conflicts: # MetalSplatter/Sources/SplatRenderer.swift
#Conflicts: # MetalSplatter/Sources/SplatRenderer.swift
|
My analysis indicates that the most significant performance bottleneck currently is on the GPU side, specifically within the rendering pipeline, which directly impacts frame rates. This is a key reason why offloading sorting to the CPU is a common practice in many viewers – it helps to prevent further burdening the GPU. To address this, I recommend offering GPU sorting as an optional feature, with CPU sorting remaining the default. When GPU sorting is active, it should be integrated and committed within the same command buffer as the render commands for optimal synchronization and performance. |
|
I agree that the rendering pipeline is currently the main bottleneck in terms of frame rates. While GPU sorting doesn’t improve FPS, it does significantly boost the update frequency of the Gaussians—at least 3× faster during viewport changes in my testing on the M3 Pro. That said, FPS is more critical, especially on mobile devices, so I’ll make CPU sorting the default as you suggested. Great point as well about integrating GPU sorting into the same command buffer. These should be straightforward fixes, I’ll circle back to them in two weeks. |
Implemented GPU Sorting based on @kemchenj 's MPSArgSort (https://gist.github.com/kemchenj/26e1dad40e5b89de2828bad36c81302f). This resolves issue #39.