{
 "id": "temporal-anti-aliasing",
 "title": "Temporal Anti-Aliasing",
 "aliases": [
  "TAA",
  "TAAU"
 ],
 "domain": "post",
 "subdomain": "anti-aliasing",
 "stage": "post",
 "realtime": "realtime",
 "platforms": [
  "webgl2",
  "webgpu",
  "desktop-gpu",
  "mobile-gpu",
  "unity",
  "unreal",
  "godot"
 ],
 "year_introduced": 2014,
 "inputs": [
  "ldr-image",
  "depth",
  "gbuffer"
 ],
 "outputs": [
  "ldr-image"
 ],
 "style": "both",
 "dynamic": "dynamic",
 "summary": "Accumulates sub-pixel-jittered frames over time, reprojecting the previous result with motion vectors and clamping it to the current neighbourhood, so aliasing averages out across frames at the cost of a one-frame history.",
 "how_it_works": "Each frame the projection matrix is offset by a sub-pixel jitter taken from a low-discrepancy sequence (Halton is typical), so over N frames the pixel centre samples N positions. The resolve pass reads the current colour, fetches the history buffer at the position given by per-pixel motion vectors, and blends them with a small weight on the current frame, usually around 5 to 10 percent.\n\nHistory is validated before blending. The common approach clamps the reprojected colour to the min/max (or a variance-based ellipsoid) of the 3x3 neighbourhood in the current frame, which rejects stale colours from disocclusions and lighting changes. Karis' variant also weights samples by inverse luminance after tonemapping to suppress fireflies. A sharpening or bicubic history fetch counters the blur caused by repeated bilinear resampling.",
 "when_to_use": "Choose it when the frame has shading aliasing (specular, thin geometry, alpha test, noisy stochastic effects) that MSAA or morphological filters cannot touch, and you have reliable motion vectors. It also denoises SSAO, SSR and volumetrics for free.\n\nPrefer `fxaa` or `smaa` when there are no motion vectors, the camera is rarely still, or ghosting is unacceptable. Prefer `dlss` or `fidelityfx-super-resolution` when you also want upscaling, since they are TAA with a larger reconstruction step.",
 "cost": {
  "class": "cheap",
  "notes": "One full-screen resolve plus a motion-vector pass; well under a millisecond at 1080p on desktop hardware, qualitative estimate."
 },
 "failure_modes": [
  "Ghosting trails behind moving objects when motion vectors are missing (transparents, particles, skinned vertex animation)",
  "Blurring and shimmering of thin high-contrast detail after the neighbourhood clamp",
  "Flicker on disocclusion for a frame or two as history is rejected",
  "Jitter-induced crawl in texture sampling unless mip bias is applied",
  "Smearing of dynamic lighting changes that history rejection misses"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "url:https://advances.realtimerendering.com/s2014",
   "type": "web",
   "title": "Advances in Real-Time Rendering in Games, SIGGRAPH 2014",
   "authors": [
    "Brian Karis"
   ],
   "year": null,
   "venue": "SIGGRAPH 2014 (High Quality Temporal Supersampling)",
   "url": "https://advances.realtimerendering.com/s2014",
   "ids": {},
   "license": null,
   "extra": {
    "http_status": 200,
    "live": true,
    "archive": {
     "url": "http://web.archive.org/web/20260719140433/https://advances.realtimerendering.com/s2014/",
     "timestamp": "20260719140433"
    },
    "page_title": "Advances in Real-Time Rendering in 3D Graphics and Games - SIGGRAPH 2014",
    "host": "advances.realtimerendering.com",
    "title_confirmed_by_page": true,
    "title_unconfirmed": false
   },
   "provenance": {
    "title": {
     "authority": "http",
     "endpoint": "GET https://advances.realtimerendering.com/s2014 → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "http",
     "endpoint": "GET https://advances.realtimerendering.com/s2014 → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 0.875,
   "__bib": "karisadvances"
  },
  {
   "role": "implementation",
   "key": "gh:mrdoob/three.js",
   "type": "code",
   "title": "mrdoob/three.js",
   "description": "JavaScript 3D Library.",
   "authors": [
    "mrdoob"
   ],
   "year": 2010,
   "venue": "GitHub",
   "url": "https://github.com/mrdoob/three.js",
   "ids": {
    "repo": "mrdoob/three.js"
   },
   "license": "MIT",
   "extra": {
    "stars": 119718,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": false,
    "pushed_at": "2026-11-29T11:39:51Z",
    "language": "JavaScript",
    "homepage": "https://threejs.org/",
    "license_name": "MIT License"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mrdoob/three.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mrdoob/three.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mrdoob/three.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mrdoob/three.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mrdoob/three.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/mrdoob/three.js",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "mrdoob2010mrdoob"
  }
 ],
 "presets": [
  {
   "id": "temporal-anti-aliasing-specimen",
   "title": "Left: one aliased sample per pixel. Right: 8 Halton-jittered frames blended with an exponential history (static scene)",
   "runtime": "glsl-fragment",
   "params": {
    "ALPHA": 0.25
   },
   "code": "float hash(vec2 c){uvec2 u=uvec2(ivec2(floor(c)));uint h=u.x*1597334673u^u.y*3812015801u;h^=h>>15;h*=2246822519u;h^=h>>13;h*=3266489917u;h^=h>>16;return float(h)*(1./4294967296.);}\nfloat lum(vec3 c){return dot(c,vec3(.2126,.7152,.0722));}\nvec3 gam(vec3 c){return pow(clamp(c,0.,1.),vec3(1./2.2));}\nvec3 scnA(vec2 px){vec2 p=(px-256.)/512.;\n  vec3 c=vec3(.93,.92,.88);\n  float s=fract((p.x*.866+p.y*.5)*11.);c=mix(c,vec3(.1,.12,.2),step(s,.18)*step(abs(p.y+p.x*.3),.38));\n  float d=length(p-vec2(.0,.0));c=mix(c,vec3(.85,.25,.2),step(abs(d-.2),.02));\n  c=mix(c,vec3(.1,.5,.4),step(length(p-vec2(-.25,.28)),.1));\n  c=mix(c,vec3(.1),step(abs(p.x-.2),.004)*step(abs(p.y-.1),.3));\n  return c;}\n\nconst float ALPHA=0.25; // P\nconst vec2 J[8]=vec2[8](vec2(0.,-.1667),vec2(-.25,.1667),vec2(.25,-.3889),vec2(-.375,-.0556),vec2(.125,.2778),vec2(-.125,-.2778),vec2(.375,.0556),vec2(-.4375,.3889));\nvoid mainImage(out vec4 fragColor,in vec2 fragCoord){\n  vec2 uv=(fragCoord-.5*iResolution.xy)/iResolution.y;bool R=uv.x>0.;vec2 q=vec2(uv.x+(R?-.25:.25),uv.y);\n  vec3 col=scnA(fragCoord);\n  if(R){vec3 acc=vec3(0.);float ws=0.,w=ALPHA;\n    for(int k=0;k<8;k++){acc+=w*scnA(fragCoord+J[k]*2.);ws+=w;w*=1.-ALPHA;}\n    col=acc/ws;}\n  if(abs(uv.x)<.0015)col=vec3(1.);fragColor=vec4(clamp(col,0.,1.),1.);\n}",
   "basis": "original",
   "license_note": "written for this index",
   "execution_fidelity": "conceptual-diagram",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-29",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "temporal-anti-aliasing",
     "runtime": "glsl-fragment",
     "checked_at": "2026-11-29T15:51:50.471Z",
     "renderer": "Chromium 145.0.7632.6 headless, WebGL2 via ANGLE/SwiftShader, 512×512, iTime=1.5",
     "stats": {
      "mean": 0.7794,
      "std": 0.2815,
      "unique_colors": 56
     },
     "image": "/specimens/temporal-anti-aliasing-specimen.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "fxaa",
  "smaa",
  "dlss",
  "fidelityfx-super-resolution",
  "per-object-motion-blur"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [
  {
   "id": "per-object-motion-blur",
   "why": "Motion vectors produced for TAA are the same buffer the motion blur pass consumes."
  },
  {
   "id": "contrast-adaptive-sharpening",
   "why": "CAS restores the detail lost to history blur after the resolve."
  }
 ],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/post/temporal-anti-aliasing.json"
 },
 "solves": [
  "specular and thin geometry shimmer",
  "edge filters don't fix shading aliasing",
  "alpha-tested foliage crawls and shimmers",
  "noisy effects need smoothing across frames"
 ],
 "authority": "Karis",
 "url": "https://texelatlas.vercel.app/t/temporal-anti-aliasing/",
 "execution_fidelity": "conceptual-diagram",
 "fidelity_label": "Visual Diagram",
 "benchmark_eligible": false,
 "gpu_weight": {
  "weight_x": 5.95,
  "tier": "light",
  "p50_ms": 0.1956,
  "p95_ms": 0.2038,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 40,
  "preset_id": "temporal-anti-aliasing-specimen",
  "execution_fidelity": "conceptual-diagram",
  "fidelity_label": "Visual Diagram",
  "benchmark_eligible": false,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 5.31,
   "tier": "light",
   "p50_ms": 0.0845,
   "p95_ms": 0.0856,
   "speedup_x": 2.31,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 3.88,
   "tier": "light",
   "p50_ms": 0.1117,
   "p95_ms": 0.1121,
   "speedup_x": 1.75,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}