scier / MetalSplatter

Render Gaussian Splats using Metal on Apple platforms (iOS/iPhone/iPad, macOS, and visionOS)
MIT License
272 stars 35 forks source link

match the original cuda implementation #25

Closed Yang-Xijie closed 3 months ago

Yang-Xijie commented 3 months ago

The calculation of alpha keeps the same.

scier commented 3 months ago

I can see a small visual improvement in large splats, but there's also a performance penalty -- I'm seeing 3.5% or more on fragment-bound (high resolution or low splat count) scenes. Do you have any measurements of whether this quantitatively impacts visual quality (e.g. PSNR)?

Yang-Xijie commented 3 months ago

Since the 3DGS models are mainly derived from https://github.com/graphdeco-inria/diff-gaussian-rasterization, it will be better for the viewer to keep the same with the training forward pass.

The radius in the original CUDA implementation bounds the 99% confidence interval (3.0) of a 2D splat (https://github.com/graphdeco-inria/diff-gaussian-rasterization/blob/59f5f77e3ddbac3ed9db93ec2cfe99ed6c5d121d/cuda_rasterizer/forward.cu#L232), which has a specific meaning.

Since the radius is modified from 2.828 to 3.0, more fragments are created from single instance, therefore introducing a slight performance penalty.