Stochastic Ray Tracing for the Reconstruction of 3D Gaussian Splatting

Peiyu Xu, Shuang Zhao, Xin Sun, Krishna Mullia, Raymond Fei, Iliyan GeorgievCVPR 2026

TL;DR

This paper introduces a differentiable, sorting-free stochastic ray tracing framework for 3D Gaussian Splatting (3DGS). By leveraging an unbiased Monte Carlo estimator to compute pixel-color gradients from only a small subset of sampled Gaussians per ray, the method eliminates the costly depth-sorting bottleneck of traditional ray-traced 3DGS. This unlocks real-time reconstruction speeds comparable to rasterization-based methods while delivering physically accurate shadows and reflections for relightable scenes.

What Problem Does This Paper Address?

3D Gaussian Splatting (3DGS) has revolutionized 3D scene reconstruction and real-time rendering. However, standard 3DGS relies on rasterization—projecting and alpha-blending 3D Gaussians onto a 2D screen. While incredibly fast, rasterization struggles with complex light transport, imposing rigid pinhole camera assumptions and lacking native support for accurate shadows, reflections, or refractions.

To overcome this, recent methods have turned to ray tracing. By intersecting camera rays directly with Gaussians, they can handle non-linear camera models (like fisheye lenses) and secondary ray effects. The catch? Ray-traced 3DGS is notoriously slow because it requires sorting every single intersecting Gaussian by depth along every single ray. Furthermore, when dealing with relightable scenes, existing ray-tracing methods often fall back on rasterization-style approximations like shadow mapping, defeating the purpose of a unified ray-tracing pipeline.

While non-differentiable stochastic ray tracing can render scenes without sorting, it cannot be used to reconstruct (train) them from images. This paper bridges that gap by introducing a fully differentiable stochastic ray tracing formulation.

Methods

The core innovation is a sorting-free, multi-sample Monte Carlo algorithm that provides unbiased gradient estimates for both Gaussian colors ($\partial C/\partial c_i$) and opacities ($\partial C/\partial \alpha_i$).

Instead of sorting all $n$ Gaussians along a ray, the algorithm uses a two-step stochastic selection process during the backward pass:

  1. Sample Index $I$: A Gaussian $g_I$ is randomly selected along the ray with a probability proportional to its contribution to the pixel color.
  2. Sample Index $K$: A second Gaussian $g_K$ is randomly selected strictly behind $g_I$ using a similar probability distribution.
Stochastic gradient estimation process selecting primary Gaussian $g_I$ and a secondary Gaussian $g_K$ behind it.

By evaluating the color difference between these two sampled Gaussians, the complex, depth-dependent gradient formulation simplifies into a lightweight stochastic estimator: $$\langle\partial_{\alpha}C\rangle_I = \frac{1}{\alpha_I}(c_I - c_K)$$

For relightable 3DGS, the authors integrate a lightweight neural BRDF decoder shared across all Gaussians. The same stochastic framework is extended to evaluate shadow rays and environmental illumination. To compute light transmittance ($T$), the algorithm traces a shadow ray and stochastically checks for occlusions without requiring any explicit depth sorting or shadow maps.

Datasets

The authors evaluated their approach across several standard benchmarks:

  • Novel View Synthesis (Standard 3DGS): MipNeRF360, Tanks & Temples, Deep Blending, and NeRF Synthetic.
  • Relightable 3DGS: The NRHints dataset, which contains scenes specifically evaluated under varying illumination conditions.

Key Insights and Ideas

  • Bypassing the Sorting Bottleneck: The mathematical "aha!" moment comes from realizing that choosing the right probability mass function perfectly cancels out the complex product terms in the alpha-blending gradient equation. This turns an $O(n \log n)$ sorting problem into an $O(1)$ stochastic evaluation per sample.
  • Unified Shadow Transport: Because the visibility estimator is inherently ray-based, shadow rays can be evaluated using a modified version of the primary ray algorithm. This allows the system to naturally simulate hard shadows, soft area shadows, and image-based lighting (IBL) within a single unified framework, as shown in Figure 1.
Figure 1. We introduce a differentiable stochastic formulation for ray-traced 3DGS, enabling efficient reconstruction and rendering of both standard and relightable 3DGS scenes. In this figure, we show re-renderings of our reconstructed standard 3DGS model (a) as well as relightable ones under local point light (b), area light (c), and image-based environmental illumination (d).

Key Results

  • Speedups: Compared to the state-of-the-art sorting-based ray tracer (3DGRT), the proposed stochastic backward pass cuts per-iteration training time by more than half (e.g., dropping from 87.5 ms to 39.8 ms total time per iteration on MipNeRF360). It matches the optimization speed of vanilla rasterized 3DGS while retaining all the benefits of ray tracing.
  • Quality: On standard novel view synthesis, the method achieves visual quality comparable to deterministic baselines. On relighting benchmarks, it significantly outperforms prior work (like RNG and GS³), delivering much higher fidelity in geometry and shadow rendering due to its accurate, ray-traced transmittance computation.

Limitations and Future Work

The primary limitation acknowledged by the authors is that the stochastic formulation introduces variance into the gradient estimates. While this variance does not harm final rendering quality, it occasionally interferes with the splitting and pruning heuristics used during the Gaussian densification phase (the process where the model decides to spawn more Gaussians in detailed areas). Investigating how to better adapt densification strategies to handle stochastic gradient noise is a key direction for future work.

Summary updated

BibTeX
@inproceedings{xu2026stochastic,
  author = {Peiyu Xu and Shuang Zhao and Xin Sun and Krishna Mullia and Raymond Fei and Iliyan Georgiev},
  title = {{Stochastic Ray Tracing for the Reconstruction of 3D Gaussian Splatting}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=H0eC9CQzOU},
}
Figure