---
id: "ggx-trowbridge-reitz"
title: "GGX / Trowbridge-Reitz normal distribution"
domain: "materials"
stage: "material"
realtime: "realtime"
platforms: [webgl2, webgpu, desktop-gpu, mobile-gpu, unity, unreal, godot, blender]
year_introduced: 2007
inputs: [material-params, normals]
outputs: [radiance]
style: "photoreal"
dynamic: "both"
cost: "cheap"
authority: "Walter et al., 2007"
url: "https://texelatlas.vercel.app/t/ggx-trowbridge-reitz/"
sources_verified_at: "2026-11-29"
---
# GGX / Trowbridge-Reitz normal distribution (Walter et al., 2007)

> The microfacet normal distribution with a long, heavy tail, popularised for graphics by Walter et al. Its soft halo around the highlight matches measured materials well and it has closed-form visible-normal sampling, so it is the default D term in PBR.

## Reach for it when

- highlights look plasticky with no long tail
- need a physically based specular lobe for metals
- specular falloff too sharp compared to real materials
- match reflections of rough surfaces seen in photographs

## How it works

GGX describes the density of microfacet normals with an ellipsoid-derived function: D(h) = a^2 / (pi * ((n.h)^2 (a^2 - 1) + 1)^2), where a = roughness^2 in the common remapping. Compared with Beckmann it falls off polynomially rather than exponentially, giving the characteristic bright core with a faint wide glow. Walter et al. introduced it to graphics (it is the Trowbridge-Reitz distribution from 1975 optics) in the context of rough refraction, and showed how to importance-sample it. In a renderer it appears as the D factor of a Cook-Torrance BRDF; pair it with the height-correlated Smith G for consistency. The anisotropic form replaces a with two axis-aligned roughnesses ax, ay.

## When to use it

Choose it as the D term of any real-time or offline microfacet specular lobe; it is the de facto standard in glTF, Unreal, Filament and OpenPBR. Prefer plain Beckmann only to match legacy assets. For fabric or velvet, where highlights brighten at grazing angles, prefer [Charlie sheen (Estevez-Kulla)](https://texelatlas.vercel.app/t/charlie-sheen.md). For stretched highlights use [Anisotropic GGX](https://texelatlas.vercel.app/t/anisotropic-ggx.md).

## Cost

cheap — One division and a few multiplies per light; the cost is dominated by the surrounding lighting, not D.
Measured GPU Weight: 1.91× baseline (feather) — 0.0627 ms median / 0.0654 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 1.77× baseline (feather) — 0.0282 ms median (2.22× faster on L4).
Ampere A100 scaling: 1.25× baseline (feather) — 0.0361 ms median (1.74× faster on A100).

## Failure modes

- Very low roughness makes D numerically explode near the peak, so clamp roughness (about 0.03-0.045) or you get fireflies and aliased pinpoint highlights
- Long tail can overpower thin dielectric looks, creating a milky halo on glossy plastics
- Without specular antialiasing (toksvig-mipmapping, normal-distribution-filtering) normal-mapped surfaces shimmer
- Single-scattering GGX darkens rough metals; compensate with kulla-conty-multiscatter

## Engine support

- babylonjs: builtin — `BABYLON.PBRMaterial (GGX NDF is the default microfacet distribution)` (evidence: https://github.com/BabylonJS/Babylon.js/blob/9.38.0/packages/dev/core/src/Shaders/ShadersInclude/pbrBRDFFunctions.fx, checked 2026-12-01)
- blender: builtin — `Principled BSDF > Distribution = GGX or Multiscatter GGX` (evidence: https://docs.blender.org/manual/en/5.2/render/shader_nodes/shader/principled.html, checked 2026-12-01)
- godot: builtin — `StandardMaterial3D default specular mode SPECULAR_SCHLICK_GGX` (evidence: https://github.com/godotengine/godot/blob/4.7.2-stable/doc/classes/BaseMaterial3D.xml, checked 2026-12-01)
- threejs: builtin — `MeshStandardMaterial / MeshPhysicalMaterial` (evidence: https://github.com/mrdoob/three.js/blob/r187/src/nodes/functions/BSDF/D_GGX.js, checked 2026-12-01)
- unity: builtin — `Lit shaders in URP and HDRP` (evidence: https://github.com/Unity-Technologies/Graphics/blob/557f6ac22b948284f57ffae6a789751fd1f63620/Packages/com.unity.render-pipelines.core/ShaderLibrary/BSDF.hlsl, checked 2026-12-01) — URP and HDRP.
- unreal: builtin — `Material > Shading Model = Default Lit / Substrate (GGX normal distribution driven by Roughness)` (evidence: https://dev.epicgames.com/documentation/en-us/unreal-engine/physically-based-materials-in-unreal-engine, checked 2026-12-01)

## Dataflow

- Inputs: material-params, normals
- Outputs: radiance
- Platforms: webgl2, webgpu, desktop-gpu, mobile-gpu, unity, unreal, godot, blender

## Presets

### Aluminium, roughness 0.35 (three-material; rendered 2026-11-29)

```json
{
  "color": "#f5f6f6",
  "roughness": 0.35,
  "metalness": 1
}
```

Attribution: written for this index; colour, IOR and metalness from physicallybased.info (CC0), roughness chosen here; basis: 2

### Polished gold (three-material; rendered 2026-11-29)

```json
{
  "color": "#ffe496",
  "roughness": 0.12,
  "metalness": 1
}
```

Attribution: written for this index; colour, IOR and metalness from physicallybased.info (CC0), roughness chosen here; basis: 2

### GGX / Trowbridge-Reitz microfacet BRDF (WGSL) (webgpu-wgsl; WebGPU WGSL runtime)

```json
{
  "ROUGHNESS": 0.28,
  "METALNESS": 0.85,
  "IOR": 1.5
}
```

```wgsl
// WebGPU WGSL fragment specimen: GGX NDF + Smith G2 + Schlick Fresnel
const ROUGHNESS: f32 = 0.2800; // P
const METALNESS: f32 = 0.8500; // P
const IOR: f32 = 1.5000; // P

fn d_ggx(nh: f32, a: f32) -> f32 {
  let a2 = a * a;
  let d = nh * nh * (a2 - 1.0) + 1.0;
  return a2 / (3.1415926 * d * d + 1e-5);
}

fn f_schlick(uVal: f32, f0: vec3f) -> vec3f {
  return f0 + (vec3f(1.0) - f0) * pow(clamp(1.0 - uVal, 0.0, 1.0), 5.0);
}

fn studio_env(d: vec3f) -> vec3f {
  let y = clamp(d.y * 0.5 + 0.5, 0.0, 1.0);
  let key = smoothstep(0.82, 0.96, dot(d, normalize(vec3f(0.55, 0.72, 0.42)))) * 2.6;
  let rim = smoothstep(0.80, 0.95, dot(d, normalize(vec3f(-0.72, 0.40, 0.56)))) * 1.4;
  return mix(vec3f(0.18, 0.19, 0.21), vec3f(0.82, 0.84, 0.86), pow(y, 1.2)) + vec3f(key + rim * 0.85);
}

@fragment
fn fs_main(@builtin(position) pos: vec4f) -> @location(0) vec4f {
  let uv = (pos.xy - 0.5 * u.resolution) / u.resolution.y;
  let ro = vec3f(0.0, 0.12, 2.6);
  let rd = normalize(vec3f(uv.x, -uv.y, -1.45));
  let b = dot(ro, rd);
  let c = dot(ro, ro) - 0.62;
  let h = b * b - c;
  if (h < 0.0) {
    let bg = mix(vec3f(0.86, 0.87, 0.85), vec3f(0.75, 0.76, 0.78), clamp(-uv.y + 0.5, 0.0, 1.0));
    return vec4f(pow(bg, vec3f(1.0 / 2.2)), 1.0);
  }
  let p = ro + rd * (-b - sqrt(h));
  let n = normalize(p);
  let v = -rd;
  let l = normalize(vec3f(cos(u.time * 0.4) * 0.75, 0.72, 0.62));
  let hv = normalize(l + v);
  let nl = max(dot(n, l), 0.0);
  let nv = max(dot(n, v), 0.001);
  let nh = max(dot(n, hv), 0.0);
  let vh = max(dot(v, hv), 0.0);
  let base = vec3f(0.88, 0.71, 0.46);
  let f0s = pow((IOR - 1.0) / (IOR + 1.0), 2.0);
  let f0 = mix(vec3f(f0s), base, METALNESS);
  let a = max(0.04, ROUGHNESS * ROUGHNESS);
  let F = f_schlick(vh, f0);
  let D = d_ggx(nh, a);
  let G = 1.0 / (4.0 * max(nl * nv, 0.05));
  let spec = D * F * G * nl * 2.5;
  let diff = (vec3f(1.0) - F) * (1.0 - METALNESS) * base / 3.1415926 * nl * 2.2;
  let ibl = studio_env(reflect(-v, n)) * f_schlick(nv, f0) * mix(1.0, 0.25, ROUGHNESS) + studio_env(n) * (1.0 - METALNESS) * base * 0.35;
  let col = diff + spec + ibl;
  let mapped = (col * (2.51 * col + 0.03)) / (col * (2.43 * col + 0.59) + 0.14);
  return vec4f(pow(clamp(mapped, vec3f(0.0), vec3f(1.0)), vec3f(1.0 / 2.2)), 1.0);
}
```

Attribution: written for this index

## Lineage

- extends [Cook-Torrance microfacet BRDF](https://texelatlas.vercel.app/t/cook-torrance-brdf.md)
- extended by [Anisotropic GGX](https://texelatlas.vercel.app/t/anisotropic-ggx.md)
- extended by [Disney principled BRDF](https://texelatlas.vercel.app/t/disney-principled-brdf.md)
- extended by [Kulla-Conty multiple-scattering compensation](https://texelatlas.vercel.app/t/kulla-conty-multiscatter.md)
- extended by [Smith masking-shadowing function](https://texelatlas.vercel.app/t/smith-masking-shadowing.md)

## Sources

1. [primary] Bruce Walter, Stephen R. Marschner, Hongsong Li, Kenneth E. Torrance (2007) Microfacet Models for Refraction through Rough Surfaces. Rendering Techniques. https://doi.org/10.2312/egwr/egsr07/195-206 (verified via doi.org on 2026-11-29)
2. [implementation] mrdoob (2010) mrdoob/three.js. https://github.com/mrdoob/three.js License: MIT. (verified via github on 2026-11-29)
3. [dataset] Anton Palmqvist physicallybased.info. physicallybased.info. https://physicallybased.info/ (verified via http on 2026-11-29)

## Cite this entry

Texel. "GGX / Trowbridge-Reitz normal distribution." https://texelatlas.vercel.app/t/ggx-trowbridge-reitz/ (accessed 2026-12-01).
