---
id: "ltc-area-lights"
title: "Linearly Transformed Cosines for Area Lights"
aliases: [LTC]
domain: "gi"
stage: "lighting"
realtime: "realtime"
platforms: [webgl2, webgpu, desktop-gpu, unity, unreal]
year_introduced: 2016
inputs: [gbuffer, material-params]
outputs: [radiance]
style: "photoreal"
dynamic: "dynamic"
cost: "cheap"
authority: "Heitz et al., 2016"
url: "https://texelatlas.vercel.app/t/ltc-area-lights/"
sources_verified_at: "2026-11-29"
---
# Linearly Transformed Cosines for Area Lights (Heitz et al., 2016)

> Fits a BRDF lobe with a clamped cosine transformed by a 3x3 matrix. Since the integral of a cosine over a polygon has a closed form, polygonal area lights are shaded exactly without sampling, noise or shadow rays.

## Reach for it when

- rectangular light sources look like point lights
- need soft specular highlights from large lights
- fluorescent panel reflections in real time
- area light shading without sampling noise

## How it works

A clamped cosine distribution over the sphere can be integrated against a polygon in closed form (it reduces to summing edge contributions). The trick is that a **linear transform** of a cosine lobe is still a normalized distribution: if `D(w) = cos_clamped(M^-1 w) * |det(M^-1)| / |M^-1 w|^3`, then the polygon integral of `D` equals the cosine integral of the polygon *transformed by `M^-1`*.

So the BRDF (GGX for a given roughness and view angle) is fitted offline with a matrix `M` and magnitude/Fresnel terms. Fits across the 2D parameter space of roughness and view angle are stored in two small 64x64 lookup textures. At runtime a pixel samples the textures for its `M^-1`, transforms the light polygon's vertices into the cosine-lobe space, clips against the horizon, and evaluates the closed-form edge sum.

Diffuse shading uses `M = I`. Textured area lights (a TV screen) are supported by filtering the texture with a lookup based on the solid angle of the polygon.

## When to use it

Choose it for noise-free rectangular, disc or polygonal area lights with GGX materials in forward or deferred shading, where you want soft highlights from fluorescent tubes and windows at a few ALU ops per light.

Prefer [restir-di](restir-di) or sampling with [light-bvh-many-lights](light-bvh-many-lights) when many emitters or shadowing must be handled, since LTC gives unshadowed lighting. Prefer [split-sum-ibl](split-sum-ibl) for distant environment lighting. Prefer [path-tracing](path-tracing) offline for accurate shadows and multi-bounce.

## Cost

cheap — Per-light cost is two LUT fetches plus a small polygon integral; performance scales with vertex count of each light.
Measured GPU Weight: 8.43× baseline (moderate) — 0.2775 ms median / 0.2867 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 6.62× baseline (moderate) — 0.1053 ms median (2.64× faster on L4).
Ampere A100 scaling: 5.31× baseline (light) — 0.153 ms median (1.81× faster on A100).

## Failure modes

- No shadows: occlusion must be added separately (shadow maps, ray-traced shadows), and unshadowed light leaks under a table
- Fit error: the LTC approximation is not exact for grazing angles or very rough/anisotropic materials
- Polygon must be clipped to the horizon, and lights that straddle the surface plane need careful handling to avoid discontinuities
- Textured light filtering is approximate, with blurring of high-frequency texture detail

## Engine support

- babylonjs: builtin — `new BABYLON.RectAreaLight('l', position, width, height, scene)` (evidence: https://github.com/BabylonJS/Babylon.js/blob/9.38.0/packages/dev/core/src/Lights/rectAreaLight.ts, checked 2026-12-01)
- blender: builtin — `EEVEE Area Light analytic lighting via Linearly Transformed Cosines` (evidence: https://docs.blender.org/manual/en/5.2/render/lights/light_object.html, checked 2026-12-01)
- godot: builtin — `Add an AreaLight3D node` (evidence: https://github.com/godotengine/godot/blob/4.7.2-stable/doc/classes/AreaLight3D.xml, checked 2026-12-01) — Forward+ full support; limited on Mobile and Compatibility.
- threejs: builtin — `new THREE.RectAreaLight(color, intensity, w, h); RectAreaLightUniformsLib.init() on WebGLRenderer` (evidence: https://github.com/mrdoob/three.js/blob/r187/src/lights/RectAreaLight.js, checked 2026-12-01)
- unity: builtin — `Light > Shape = Rectangle / Tube / Disc (HDRP area lights)` (evidence: https://github.com/Unity-Technologies/Graphics/blob/557f6ac22b948284f57ffae6a789751fd1f63620/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/LTCAreaLight/LTCAreaLight.cs, checked 2026-12-01) — HDRP area lights are shaded with LTC tables. URP has no real-time area lights.
- unreal: builtin — `Place Actors > Lights > Rect Light (RectLightComponent rectangular area lights)` (evidence: https://dev.epicgames.com/documentation/en-us/unreal-engine/rectangular-area-lights-in-unreal-engine, checked 2026-12-01)

## Dataflow

- Inputs: gbuffer, material-params
- Outputs: radiance
- Platforms: webgl2, webgpu, desktop-gpu, unity, unreal

## Presets

### Analytic LTC polygonal quad area light — noise-free GGX specular and cosine diffuse (glsl-fragment; rendered 2026-11-30)

```json
{
  "ROUGHNESS": 0.28,
  "LIGHT_WIDTH": 1.4,
  "LIGHT_HEIGHT": 0.85,
  "INTENSITY": 3.2
}
```

```glsl
const float ROUGHNESS = 0.28; // P
const float LIGHT_WIDTH = 1.4; // P
const float LIGHT_HEIGHT = 0.85; // P
const float INTENSITY = 3.2; // P

vec3 integrateEdgeVec(vec3 v1, vec3 v2) {
  float x = clamp(dot(v1, v2), -0.9999, 0.9999);
  float y = abs(x);
  float a = 0.8543985 + (0.4965155 + 0.0145206 * y) * y;
  float b = 3.4175940 + (4.1616724 + y) * y;
  float v = a / b;
  float theta_sintheta = (x > 0.0) ? v : 0.5 * inversesqrt(max(1.0 - x * x, 1e-6)) - v;
  return cross(v1, v2) * theta_sintheta;
}

float ltcEvaluate(vec3 N, vec3 V, vec3 P, mat3 invM, vec3 pts[4]) {
  vec3 T1 = normalize(V - N * dot(V, N));
  vec3 T2 = cross(N, T1);
  mat3 basis = invM * transpose(mat3(T1, T2, N));

  vec3 L[4];
  for (int i = 0; i < 4; i++) L[i] = basis * (pts[i] - P);
  vec3 dir = pts[0] - P;
  vec3 lightNormal = cross(pts[1] - pts[0], pts[3] - pts[0]);
  bool behind = (dot(dir, lightNormal) < 0.0);

  for (int i = 0; i < 4; i++) L[i] = normalize(L[i]);
  vec3 vsum = vec3(0.0);
  vsum += integrateEdgeVec(L[0], L[1]);
  vsum += integrateEdgeVec(L[1], L[2]);
  vsum += integrateEdgeVec(L[2], L[3]);
  vsum += integrateEdgeVec(L[3], L[0]);

  float len = length(vsum);
  float z = vsum.z / max(len, 1e-5);
  if (behind) z = -z;
  float ff = clamp(0.5 * (z + 1.0), 0.0, 1.0);
  return max(0.0, len * ff * ff);
}

mat3 approxLtcInvM(float rough, float ndv) {
  float r = clamp(rough, 0.05, 1.0);
  float a = 1.0 / max(r * r, 0.012);
  float skew = (1.0 - ndv) * (1.0 - r) * 1.15;
  return mat3(
    a, 0.0, 0.0,
    0.0, a, 0.0,
    -skew * a * 0.55, 0.0, 1.0
  );
}

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;
  vec3 ro = vec3(0.0, 0.52, 3.1);
  vec3 rd = normalize(vec3(uv.x, uv.y - 0.08, -1.55));

  float ang = 0.55 * sin(iTime * 0.55);
  float tilt = 0.22;
  if (iMouse.z > 0.5 || length(iMouse.xy) > 1.0) {
    vec2 m = iMouse.xy / iResolution.xy * 2.0 - 1.0;
    ang = m.x * 1.2;
    tilt = clamp(m.y * 0.5 + 0.2, -0.3, 0.7);
  }
  float hw = max(LIGHT_WIDTH, 0.15) * 0.5;
  float hh = max(LIGHT_HEIGHT, 0.15) * 0.5;
  vec3 lCenter = vec3(sin(ang) * 1.25, 0.85 + tilt * 0.45, -1.35 + cos(ang) * 0.35);
  vec3 lRight = normalize(vec3(cos(ang), 0.0, -sin(ang)));
  vec3 lUp = normalize(cross(normalize(-lCenter), lRight));
  vec3 lFwd = normalize(cross(lRight, lUp));

  vec3 pts[4];
  pts[0] = lCenter - lRight * hw - lUp * hh;
  pts[1] = lCenter + lRight * hw - lUp * hh;
  pts[2] = lCenter + lRight * hw + lUp * hh;
  pts[3] = lCenter - lRight * hw + lUp * hh;

  float tBest = 1e5;
  int hitId = 0;
  vec3 hitP = vec3(0.0), hitN = vec3(0.0);

  // Floor y = -0.6
  if (rd.y < -1e-4) {
    float tf = (-0.6 - ro.y) / rd.y;
    if (tf > 0.0 && tf < tBest) { tBest = tf; hitId = 1; hitP = ro + rd * tf; hitN = vec3(0.0, 1.0, 0.0); }
  }
  // Center sphere
  vec3 sc = vec3(0.0, -0.05, 0.15);
  float sr = 0.55;
  vec3 oc = ro - sc;
  float b = dot(oc, rd), c = dot(oc, oc) - sr * sr, h = b * b - c;
  if (h > 0.0) {
    float ts = -b - sqrt(h);
    if (ts > 0.0 && ts < tBest) { tBest = ts; hitId = 2; hitP = ro + rd * ts; hitN = normalize(hitP - sc); }
  }
  // Area light quad
  float denom = dot(rd, lFwd);
  if (abs(denom) > 1e-4) {
    float tl = dot(lCenter - ro, lFwd) / denom;
    if (tl > 0.0 && tl < tBest) {
      vec3 lp = ro + rd * tl - lCenter;
      if (abs(dot(lp, lRight)) <= hw && abs(dot(lp, lUp)) <= hh) {
        tBest = tl; hitId = 3; hitP = ro + rd * tl;
      }
    }
  }

  vec3 col = mix(vec3(0.025, 0.03, 0.045), vec3(0.08, 0.1, 0.14), clamp(uv.y + 0.5, 0.0, 1.0));
  vec3 lightCol = vec3(1.0, 0.86, 0.68) * max(INTENSITY, 0.05);

  if (hitId == 3) {
    col = lightCol * 1.4;
  } else if (hitId > 0) {
    vec3 V = -rd;
    float ndv = max(dot(hitN, V), 0.02);
    float rough = hitId == 1 ? clamp(ROUGHNESS, 0.06, 0.98) : clamp(ROUGHNESS * 0.72, 0.05, 0.95);
    vec2 tile = floor(hitP.xz * 1.5);
    float chk = mod(tile.x + tile.y, 2.0);
    vec3 albedo = hitId == 1 ? mix(vec3(0.14, 0.16, 0.19), vec3(0.24, 0.26, 0.30), chk) : vec3(0.76, 0.42, 0.24);
    float metal = hitId == 2 ? 0.55 : 0.12;
    vec3 F0 = mix(vec3(0.04), albedo, metal);
    vec3 F = F0 + (1.0 - F0) * pow(1.0 - ndv, 5.0);

    float diffIrr = ltcEvaluate(hitN, V, hitP, mat3(1.0), pts);
    float specIrr = ltcEvaluate(hitN, V, hitP, approxLtcInvM(rough, ndv), pts);
    // Analytic sphere occlusion approximation on floor
    float occ = 1.0;
    if (hitId == 1) {
      vec3 toS = sc - hitP;
      float d = length(toS);
      float cosA = dot(toS / d, normalize(lCenter - hitP));
      occ = mix(1.0, 0.28, smoothstep(0.6, 0.95, cosA) * smoothstep(2.2, 0.55, d));
    }
    vec3 diff = (1.0 - metal) * (1.0 - F) * albedo * diffIrr * 0.42;
    vec3 spec = F * specIrr * mix(1.6, 0.35, rough);
    col = (diff + spec) * lightCol * occ + albedo * vec3(0.03, 0.04, 0.065);
  }
  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}
```

Attribution: MIT — written for this index

## Lineage

- extended by [Analytic LTC Cylindrical and Tube Area Lights](https://texelatlas.vercel.app/t/ltc-cylindrical-tube-lights.md)

## Combines with

- [Split-Sum Image-Based Lighting](https://texelatlas.vercel.app/t/split-sum-ibl.md): LTC lights the surface from local area emitters while the split-sum term adds the distant environment.

## Sources

1. [primary] Eric Heitz, Jonathan Dupuy, Stephen Hill, David Neubelt (2016) Real-time polygonal-light shading with linearly transformed cosines. ACM Transactions on Graphics. https://doi.org/10.1145/2897824.2925895 (verified via crossref on 2026-11-30)
2. [tutorial] Eric Heitz Real-Time Polygonal-Light Shading with Linearly Transformed Cosines (project page). eheitzresearch.wordpress.com. https://eheitzresearch.wordpress.com/415-2 (verified via http on 2026-11-29)

## Cite this entry

Texel. "Linearly Transformed Cosines for Area Lights." https://texelatlas.vercel.app/t/ltc-area-lights/ (accessed 2026-12-01).
