This project is a small Python/CUDA experiment for learning one basic idea behind 3D Gaussian Splatting: sorting Gaussians by depth on the GPU.
The demo generates a small set of 3D Gaussians, computes their camera-space depth using CUDA, sorts them, and visualizes the result in Python.
- Generate 50 Gaussian centers in 3D.
- Assign each Gaussian a radius/scale and color.
- Send the data to the GPU using CuPy.
- Compute the depth of each Gaussian from the camera.
- Sort the Gaussians by depth on the GPU.
- Read the sorted data back.
- Visualize the sorted Gaussians.
Depth sorting is important for splatting and transparency because farther Gaussians are usually drawn before nearer ones.
This toy example does not implement the full 3D Gaussian Splatting renderer. It only focuses on a beginner-friendly version of the data flow:
Generate Gaussians → Compute Depth on GPU → Sort → Visualize
