Gaussian Splatting
Gaussian splatting represents a scene as a cloud of 3D Gaussians and renders by projecting them onto the image plane instead of marching along rays. That change is why it is fast, rasterization instead of integration, and it is still fully differentiable, so the Gaussians can be optimized from images.
This is a simplified rasterizer built from scratch in PyTorch, deliberately without the optimizations of the reference CUDA implementation, to keep each stage of the pipeline legible.
The rasterizer
Rendering a frame comes down to four steps. Each 3D Gaussian is projected to a 2D Gaussian on the image plane. The projected set is depth-sorted, and anything behind the camera is discarded. Alpha and transmittance are evaluated per pixel, and the colors are composited front to back. Depth and silhouette maps fall out of the same pass.
Sorting is the step that carries the most weight. Alpha compositing is order-dependent, so getting depth order wrong does not degrade the image slightly; it puts the wrong surface in front.

Training a representation
Turning the renderer around, the Gaussian parameters become trainable and the scene is fitted from posed multi-view images. Each parameter type (position, scale, opacity and color) gets its own learning rate, since they live at different scales and a single rate leaves some barely moving while others diverge.


Harder cases
Two extensions push past the easy setting. Adding spherical harmonic components lets a Gaussian change color with viewing angle, which is what makes reflective surfaces read correctly instead of flat.
The second is a scene initialized from random points rather than a good starting cloud, which is where the naive version falls apart. Getting it to converge took learning rate scheduling, an SSIM term alongside the pixel loss, adaptive density control, and anisotropic rather than isotropic Gaussians, letting each one stretch along the surface it represents.


Why the extras matter. From random initialization, nothing about the starting cloud is close to the answer. Per-parameter learning rates stop one parameter type from dominating the update; anisotropic covariances let Gaussians flatten onto surfaces instead of piling up as blobs; SSIM rewards structure the pixel loss misses; and adaptive density control adds Gaussians where detail is missing and prunes them where they are not needed.
Coursework for 16-825, Learning for 3D Vision.