---
id: "2d-gaussian-splatting"
title: "2D Gaussian Splatting"
aliases: [2DGS]
domain: "capture"
stage: "capture"
realtime: "interactive"
platforms: [cuda, desktop-gpu]
year_introduced: 2024
inputs: [photos, camera-poses, point-cloud]
outputs: [gaussians, mesh, depth]
style: "photoreal"
dynamic: "static"
cost: "medium"
authority: "Huang et al., 2024"
url: "https://texelatlas.vercel.app/t/2d-gaussian-splatting/"
sources_verified_at: "2026-11-29"
---
# 2D Gaussian Splatting (Huang et al., 2024)

> Replaces 3D ellipsoids with oriented flat 2D Gaussian discs, ray-splat intersection and depth/normal regularisers so that splats form a thin, view-consistent surface that can be meshed.

## Reach for it when

- need a clean mesh out of a photo capture quickly
- splat scene depth looks inconsistent between viewing angles
- want accurate depth and surfaces from photos in minutes
- blobby splats don't form a thin solid surface

## How it works

Each primitive is an elliptical disc with a well-defined normal, so the field is a collection of surfels instead of volumetric blobs. Rendering intersects each pixel's ray with the disc plane to compute exact local coordinates and evaluate the Gaussian there, avoiding the perspective approximation of 3DGS and giving view-consistent depth. Two regularisers shape geometry: a depth distortion loss pulls overlapping splats along a ray together, and a normal consistency loss aligns each splat's normal with the gradient of the rendered depth. Rendered depth maps from training views are fused with truncated signed distance integration and meshed with marching cubes, yielding surfaces far faster than neural SDF methods.

## When to use it

Choose it when you need a mesh or accurate depth from a photo capture in minutes. Prefer [3D Gaussian Splatting](https://texelatlas.vercel.app/t/gaussian-splatting-3dgs.md) when pure view synthesis suffices, [Neuralangelo](https://texelatlas.vercel.app/t/neuralangelo.md) for maximum detail if hours of training are acceptable, and [3DGUT (Unscented Transform Gaussian Splatting)](https://texelatlas.vercel.app/t/3dgut.md) when you need fisheye or secondary rays with a similar Gaussian pipeline.

## Cost

medium — Training in tens of minutes on one GPU; slightly slower than 3DGS due to the regularisers.
Measured GPU Weight: 296.46× baseline (extreme) — 9.1903 ms median / 9.215 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 255.87× baseline (extreme) — 4.0684 ms median (2.26× faster on L4).
Ampere A100 scaling: 207.97× baseline (extreme) — 5.9894 ms median (1.53× faster on A100).

## Failure modes

- Slightly lower novel-view PSNR than 3DGS due to the surface constraints
- Reflective and transparent materials still produce holes or spurious sheets
- Thin features like wires can be lost to the regularisers
- TSDF fusion adds voxel-resolution smoothing to the final mesh

## Dataflow

- Inputs: photos, camera-poses, point-cloud
- Outputs: gaussians, mesh, depth
- Platforms: cuda, desktop-gpu

## Presets

### 2D Gaussian Splatting — oriented flat elliptical surfel disks (left) vs ray-splat blended surface (right) (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_SURFEL_RAD": 0.22,
  "P_ASPECT": 1.55,
  "P_ROT_SPEED": 0.7,
  "P_SPLIT": 0.48
}
```

```glsl
const float P_SURFEL_RAD = 0.22; // P Surfel Disk Size [0.10, 0.34, 0.01]
const float P_ASPECT = 1.55; // P Anisotropy Ratio [1.0, 2.5, 0.05]
const float P_ROT_SPEED = 0.70; // P Orbit Speed [0.0, 2.2, 0.05]
const float P_SPLIT = 0.48; // P Disks / 2DGS Split [0.0, 1.0, 0.02]

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

// Fibonacci-sphere distribution of 36 flat oriented 2D Gaussian surfels tangent to an egg/vase surface
void get2DSurfel(int idx, float spin, float rad, float aspect, out vec3 center, out vec3 tU, out vec3 tV, out vec3 normal, out vec3 col) {
  float fi = float(idx);
  float N = 36.0;
  float y = 1.0 - (fi + 0.5) / N * 2.0;
  float rHoriz = sqrt(max(1.0 - y * y, 0.0));
  float phi = fi * 2.3999632; // golden angle

  vec3 dir = vec3(cos(phi) * rHoriz, y, sin(phi) * rHoriz);
  // Sculpted organic surface radius r(dir)
  float surfR = 0.62 + 0.10 * cos(y * 3.1415926 * 2.0) + 0.05 * cos(phi * 3.0);
  center = dir * surfR;
  normal = normalize(dir);

  // Local orthonormal tangent basis (tU, tV) spanning the flat 2D Gaussian disk!
  vec3 upRef = (abs(normal.y) < 0.92) ? vec3(0.0, 1.0, 0.0) : vec3(1.0, 0.0, 0.0);
  vec3 u0 = normalize(cross(upRef, normal));
  vec3 v0 = cross(normal, u0);

  // Rotate shape in world space
  center.xz = rot2(spin * 0.62) * center.xz;
  center.yz = rot2(0.32) * center.yz;
  normal.xz = rot2(spin * 0.62) * normal.xz;
  normal.yz = rot2(0.32) * normal.yz;
  u0.xz = rot2(spin * 0.62) * u0.xz;
  u0.yz = rot2(0.32) * u0.yz;
  v0.xz = rot2(spin * 0.62) * v0.xz;
  v0.yz = rot2(0.32) * v0.yz;

  tU = u0 * (rad * aspect);
  tV = v0 * (rad / max(aspect, 0.5));
  col = 0.52 + 0.42 * cos(phi * 0.5 + y * 2.2 + vec3(0.0, 2.094, 4.188));
}

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 isBlended = screenX >= split;
  float rad = clamp(P_SURFEL_RAD, 0.08, 0.36);
  float aspect = clamp(P_ASPECT, 1.0, 2.6);
  float spin = iTime * max(P_ROT_SPEED, 0.0);

  vec3 ro = vec3(0.0, 0.04, 2.38);
  vec3 rd = normalize(vec3(uv, -1.55));
  vec3 bg = mix(vec3(0.022, 0.032, 0.054), vec3(0.064, 0.084, 0.132), smoothstep(-0.55, 0.55, uv.y));

  // Exact ray-plane intersection against all 36 oriented flat 2D Gaussian surfels (Huang et al. 2024!)
  // Sort front-to-back using 4 depth slices so closer surfels occlude back-hemisphere surfels accurately
  vec3 accum = vec3(0.0);
  float T = 1.0;
  float rimOverlay = 0.0;
  vec3 lDir = normalize(vec3(0.56, 0.80, 0.55));

  for (int pass = 0; pass < 4; pass++) {
    float tMin = 1.30 + float(pass) * 0.42;
    float tMax = tMin + 0.42;

    for (int i = 0; i < 36; i++) {
      vec3 c, tU, tV, n, baseC;
      get2DSurfel(i, spin, rad, aspect, c, tU, tV, n, baseC);

      // Exact perspective ray-splat plane intersection: t = dot(c - ro, n) / dot(rd, n)
      float denom = dot(rd, n);
      if (abs(denom) < 1e-4) continue;
      float tHit = dot(c - ro, n) / denom;
      if (tHit < tMin || tHit >= tMax) continue;
      if (denom > 0.0) continue; // front-facing surfel culling

      vec3 pHit = ro + rd * tHit;
      vec3 rel = pHit - c;
      // Local tangent-plane Gaussian coordinates (u, v)
      float uCoord = dot(rel, tU) / max(dot(tU, tU), 1e-5);
      float vCoord = dot(rel, tV) / max(dot(tV, tV), 1e-5);
      float r2 = uCoord * uCoord + vCoord * vCoord;
      if (r2 > 2.8) continue;

      float diff = max(dot(n, lDir), 0.0);
      float spec = pow(max(dot(n, normalize(lDir - rd)), 0.0), 36.0);
      vec3 shaded = baseC * (0.28 + 0.82 * diff) + vec3(0.95) * spec * 0.42;

      if (!isBlended) {
        // Left: Crisp flat elliptical surfel disks showing tangent orientation & 1-sigma disk rims
        float disk = smoothstep(1.05, 0.88, r2);
        float rim = smoothstep(0.14, 0.02, abs(sqrt(max(r2, 0.0)) - 0.96));
        float axes = max(smoothstep(0.08, 0.02, abs(uCoord)), smoothstep(0.08, 0.02, abs(vCoord))) * step(r2, 0.92);
        vec3 dCol = mix(shaded, vec3(0.96, 0.98, 1.0), axes * 0.35);
        accum += T * disk * 0.88 * dCol;
        rimOverlay = max(rimOverlay, rim * T);
        T *= (1.0 - disk * 0.88);
      } else {
        // Right: Smooth 2D Gaussian alpha blending exp(-0.5 * (u^2 + v^2)) with consistent surface normals
        float g = exp(-1.25 * r2);
        float alpha = clamp(g * 0.86, 0.0, 0.96);
        accum += T * alpha * shaded;
        T *= (1.0 - alpha);
      }
      if (T < 0.01) break;
    }
  }

  vec3 col = accum + T * bg;
  if (!isBlended) {
    col = mix(col, vec3(0.98, 0.88, 0.38), rimOverlay * 0.78);
  }

  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)

## Combination ideas

- [ReSTIR path-traced relighting on 2D Gaussian surfels](https://texelatlas.vercel.app/ideas/surfel-splats-restir-path-tracing/)
- [Captured rooms you can bump into](https://texelatlas.vercel.app/ideas/walkable-captured-scenes/)

## Sources

1. [primary] Binbin Huang, Zehao Yu, Anpei Chen, Andreas Geiger, Shenghua Gao (2024) 2D Gaussian Splatting for Geometrically Accurate Radiance Fields. arXiv preprint (cs.CV). https://arxiv.org/abs/2403.17888 (verified via arxiv on 2026-11-29)
2. [implementation] hbb1 (2024) hbb1/2d-gaussian-splatting. https://github.com/hbb1/2d-gaussian-splatting License: NOASSERTION. (verified via github on 2026-11-29)

## Cite this entry

Texel. "2D Gaussian Splatting." https://texelatlas.vercel.app/t/2d-gaussian-splatting/ (accessed 2026-12-01).
