---
id: "3d-gaussian-ray-tracing"
title: "3D Gaussian Ray Tracing (3DGRT)"
aliases: [3DGRT, ray traced Gaussians]
domain: "capture"
stage: "capture"
realtime: "realtime"
platforms: [cuda, desktop-gpu]
year_introduced: 2024
inputs: [gaussians, camera-poses]
outputs: [ldr-image, radiance]
style: "photoreal"
dynamic: "dynamic"
cost: "heavy"
authority: "Moenne-Loccoz et al., 2024"
url: "https://texelatlas.vercel.app/t/3d-gaussian-ray-tracing/"
sources_verified_at: "2026-11-29"
---
# 3D Gaussian Ray Tracing (3DGRT) (Moenne-Loccoz et al., 2024)

> Renders trained Gaussian particles by tracing rays through a BVH over them instead of projecting and sorting splats, which allows fisheye and rolling-shutter cameras, reflections and refraction.

## Reach for it when

- splats need a fisheye or distorted camera
- want reflections and refraction on gaussian splat scenes
- rolling shutter camera model for splat rendering
- render splats without sorting and popping

## How it works

Each Gaussian is wrapped in a bounding proxy (a stretched icosahedron) and put in an RTX-accelerated BVH. For each camera ray, a hardware ray tracing pass collects the next k particles along the ray in chunks, each one is evaluated analytically for its maximum response along the ray, and their colour and opacity are alpha-composited front to back in sorted order. Because there is no projection to screen space, any camera model works, and rays can be spawned from hit points for secondary effects such as mirror reflections, refractions and shadows, which the paper does by inserting meshes alongside the particles. Training uses the same differentiable principle with tracing replacing rasterisation. Rasterising and tracing differ in sorting order, so the particle blending is per ray and exact.

## When to use it

Choose it when the splat scene must be seen through non-pinhole cameras (fisheye, distorted lenses, rolling shutter), or composed with reflective or refractive meshes. Prefer [3D Gaussian Splatting](https://texelatlas.vercel.app/t/gaussian-splatting-3dgs.md) rasterisation for the fastest standard novel-view rendering, [3DGUT (Unscented Transform Gaussian Splatting)](https://texelatlas.vercel.app/t/3dgut.md) when you want camera distortion handled inside a rasteriser via unscented transforms, and [StopThePop (Sorted Gaussian Splatting)](https://texelatlas.vercel.app/t/stopthepop.md) to fix popping from per-tile sorting.

## Cost

heavy — Slower than rasterisation but interactive on RTX-class GPUs per the authors; needs hardware ray tracing and more memory for the BVH.
Measured GPU Weight: 15.98× baseline (moderate) — 0.5256 ms median / 0.543 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 13.6× baseline (moderate) — 0.2163 ms median (2.43× faster on L4).
Ampere A100 scaling: 10.43× baseline (moderate) — 0.3005 ms median (1.75× faster on A100).

## Failure modes

- Requires hardware ray tracing and CUDA/OptiX, so there is no browser or mobile path
- BVH rebuilds are needed when Gaussians move, so highly dynamic scenes lose speed
- Proxy-geometry bounds that are too tight clip the tails of Gaussians; too loose causes extra hits and slowdowns
- Reflections of splats show the baked-in lighting and floaters of the reconstruction, not true materials

## Dataflow

- Inputs: gaussians, camera-poses
- Outputs: ldr-image, radiance
- Platforms: cuda, desktop-gpu

## Presets

### 3DGRT — rasterized pinhole splats (left) vs ray-traced 3D Gaussians with mirror reflections & fisheye (right) (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_FISHEYE": 0.32,
  "P_SPLAT_R": 0.16,
  "P_ROT_SPEED": 0.65,
  "P_SPLIT": 0.46
}
```

```glsl
const float P_FISHEYE = 0.32; // P Lens Distortion [0.0, 0.8, 0.02]
const float P_SPLAT_R = 0.16; // P Gaussian Radius [0.08, 0.28, 0.01]
const float P_ROT_SPEED = 0.65; // P Orbit Speed [0.0, 2.2, 0.05]
const float P_SPLIT = 0.46; // P Raster / 3DGRT Split [0.0, 1.0, 0.02]

mat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }

// Trace a ray through an orbital ring of 16 colored 3D Gaussian particles (exact ray-Gaussian max response)
vec4 traceGaussianCloud(vec3 ro, vec3 rd, float spin, float rad) {
  vec3 acc = vec3(0.0);
  float T = 1.0;
  float invR2 = 1.0 / max(rad * rad, 1e-4);
  for (int i = 0; i < 16; i++) {
    float fi = float(i);
    float ang = fi * 6.2831853 / 16.0 + spin * 0.6;
    float ringR = 0.92 + 0.14 * sin(fi * 3.0);
    vec3 c = vec3(cos(ang) * ringR, 0.22 * sin(fi * 2.0 + spin), sin(ang) * ringR);
    vec3 oc = c - ro;
    float tMax = dot(oc, rd);
    if (tMax > 0.05) {
      vec3 perp = oc - rd * tMax;
      // Anisotropic stretch tangent to orbital ring
      vec3 tang = normalize(vec3(-sin(ang), 0.15, cos(ang)));
      float dTang = dot(perp, tang);
      vec3 dNorm = perp - tang * dTang;
      float m2 = (dot(dNorm, dNorm) * 1.45 + dTang * dTang * 0.42) * invR2;
      float g = exp(-m2 * 1.6);
      if (g > 0.01) {
        float a = clamp(g * 0.85, 0.0, 0.94);
        vec3 gCol = 0.52 + 0.48 * cos(fi * 0.42 + vec3(0.0, 2.1, 4.2));
        gCol *= (0.85 + 0.45 * g);
        acc += T * a * gCol;
        T *= (1.0 - a);
        if (T < 0.02) break;
      }
    }
  }
  return vec4(acc, 1.0 - T);
}

vec3 aces(vec3 x) {
  x = max(x, 0.0);
  return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
  float screenX = fragCoord.x / max(iResolution.x, 1.0);
  float split = clamp(P_SPLIT, 0.0, 1.0);
  bool isGRT = screenX >= split;
  float fish = clamp(P_FISHEYE, 0.0, 0.9);
  float rad = clamp(P_SPLAT_R, 0.06, 0.30);
  float spin = iTime * max(P_ROT_SPEED, 0.0);

  vec3 ro = vec3(0.0, 0.35, 2.55);
  // 3DGRT natively traces curved fisheye camera rays; pinhole rasterization assumes linear projection
  vec2 pUV = uv;
  if (isGRT) {
    float r2 = dot(uv, uv);
    pUV = uv * (1.0 + fish * r2 * 0.85);
  }
  vec3 rd = normalize(vec3(pUV - vec2(0.0, 0.06), -1.48));

  vec3 bg = mix(vec3(0.022, 0.030, 0.052), vec3(0.068, 0.095, 0.155), smoothstep(-0.55, 0.55, rd.y));
  // Checkerboard studio floor at y = -0.58
  float tFloor = 1e5;
  if (rd.y < -0.01) {
    float tf = (-0.58 - ro.y) / rd.y;
    if (tf > 0.1 && tf < 16.0) tFloor = tf;
  }

  // Central mirror-chrome sphere at origin (R = 0.44)
  float b = dot(ro, rd);
  float c = dot(ro, ro) - 0.44 * 0.44;
  float disc = b * b - c;
  float tSph = (disc > 0.0 && (-b - sqrt(disc)) > 0.05) ? (-b - sqrt(disc)) : 1e5;

  // Background scene (floor or sky)
  vec3 sceneCol = bg;
  if (tFloor < tSph && tFloor < 1e4) {
    vec3 fp = ro + rd * tFloor;
    vec2 chk = floor(fp.xz * 2.2);
    float pat = mod(chk.x + chk.y, 2.0);
    vec3 fAlb = mix(vec3(0.08, 0.10, 0.15), vec3(0.18, 0.22, 0.30), pat);
    // Secondary reflected Gaussian glow on floor in 3DGRT mode
    if (isGRT) {
      vec3 reflD = reflect(rd, vec3(0.0, 1.0, 0.0));
      vec4 rGauss = traceGaussianCloud(fp + vec3(0.0, 0.02, 0.0), reflD, spin, rad * 1.15);
      fAlb += rGauss.rgb * 0.48;
    }
    sceneCol = mix(fAlb, bg, 1.0 - exp(-tFloor * 0.12));
  }

  if (tSph < tFloor && tSph < 1e4) {
    vec3 hp = ro + rd * tSph;
    vec3 n = normalize(hp);
    vec3 lDir = normalize(vec3(0.55, 0.85, 0.45));
    float spec = pow(max(dot(n, normalize(lDir - rd)), 0.0), 64.0);
    float fres = 0.15 + 0.85 * pow(1.0 - max(dot(n, -rd), 0.0), 3.0);
    if (isGRT) {
      // Exact secondary ray reflection through the 3D Gaussian BVH!
      vec3 reflD = reflect(rd, n);
      vec4 reflG = traceGaussianCloud(hp + n * 0.01, reflD, spin, rad);
      vec3 env = mix(vec3(0.05, 0.08, 0.14), vec3(0.24, 0.32, 0.46), smoothstep(-0.3, 0.6, reflD.y));
      sceneCol = mix(env, reflG.rgb, reflG.a) * (0.45 + 0.55 * fres) + vec3(1.0) * spec * 0.9;
    } else {
      // Pinhole rasterizer cannot trace secondary rays into the 3DGS splat buffer
      float diff = max(dot(n, lDir), 0.0);
      sceneCol = vec3(0.16, 0.20, 0.28) * (0.35 + 0.65 * diff) + vec3(0.8) * spec * 0.55;
    }
  }

  // Primary ray 3D Gaussian particles composited over scene
  vec4 primG = traceGaussianCloud(ro, rd, spin, rad);
  vec3 col = primG.rgb + (1.0 - primG.a) * sceneCol;

  float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));
  col = mix(col, vec3(0.95, 0.97, 1.0), sep);

  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}
```

Attribution: MIT — written for this index.

## Lineage

- extends [3D Gaussian Splatting](https://texelatlas.vercel.app/t/gaussian-splatting-3dgs.md)

## Combines with

- [3DGUT (Unscented Transform Gaussian Splatting)](https://texelatlas.vercel.app/t/3dgut.md): 3DGUT shares the 3dgrut codebase and gives a rasterisation path for distorted cameras that complements the traced one.

## Sources

1. [primary] Nicolas Moenne-Loccoz, Ashkan Mirzaei, Or Perel, Riccardo de Lutio, Janick Martinez Esturo, Gavriel State, Sanja Fidler, Nicholas Sharp, Zan Gojcic (2024) 3D Gaussian Ray Tracing: Fast Tracing of Particle Scenes. arXiv preprint (cs.GR). https://arxiv.org/abs/2407.07090 (verified via arxiv on 2026-11-29)
2. [implementation] nv-tlabs (2025) nv-tlabs/3dgrut. https://github.com/nv-tlabs/3dgrut License: Apache-2.0. (verified via github on 2026-11-29)

## Cite this entry

Texel. "3D Gaussian Ray Tracing (3DGRT)." https://texelatlas.vercel.app/t/3d-gaussian-ray-tracing/ (accessed 2026-12-01).
