{
 "id": "gltf-2-0",
 "title": "glTF 2.0 asset format",
 "aliases": [
  "glTF",
  "GLB",
  "gltf2"
 ],
 "domain": "performance",
 "subdomain": "asset interchange",
 "stage": "performance",
 "realtime": "realtime",
 "platforms": [
  "webgl2",
  "webgpu",
  "desktop-gpu",
  "mobile-gpu",
  "unity",
  "unreal",
  "godot",
  "blender",
  "python"
 ],
 "year_introduced": 2017,
 "inputs": [
  "mesh",
  "texture",
  "material-params",
  "skeleton",
  "animation"
 ],
 "outputs": [
  "mesh",
  "texture",
  "material-params",
  "animation"
 ],
 "style": "both",
 "dynamic": "both",
 "summary": "A JSON-plus-binary scene format with a metallic-roughness PBR material model and extensions, designed to be uploaded to the GPU with minimal processing.",
 "how_it_works": "A glTF asset is a JSON description of a scene graph (nodes, meshes, skins, cameras, animations) that points at binary buffers and image files. Buffers are organized as bufferViews and typed accessors that match GPU vertex attribute layouts, so data can often be copied to vertex buffers as is. The GLB container packs JSON and buffers into one file.\n\nMaterials use a metallic-roughness model (base color, metallic, roughness, normal, occlusion, emissive), so a viewer needs only one shader family. Everything beyond that core is optional, named extensions: KHR_materials_* for clearcoat, transmission, sheen, anisotropy and others, KHR_draco_mesh_compression and EXT_meshopt_compression for geometry, KHR_texture_basisu for KTX2 textures.\n\nAnimation is stored as keyframe samplers targeting node transforms or morph weights; skinning uses joints and weights per vertex.",
 "when_to_use": "Choose it as the runtime and web interchange format between DCC tools, three.js, Babylon, engines and viewers. Prefer USD or FBX for authoring pipelines needing layering, variants or complex rigs, and `materialx` or `openpbr-surface` where full authoring-time material graphs are needed. Add `meshoptimizer` or `draco-mesh-compression` and `basis-universal-ktx2` to shrink delivery size.",
 "cost": {
  "class": "cheap",
  "notes": "Load cost is mostly decoding compressed buffers and textures; the format itself adds little overhead."
 },
 "failure_modes": [
  "Core material model cannot express layered or measured BRDFs, so extensions are required and viewer support varies",
  "Different exporters disagree on units, axis conventions and sRGB vs linear texture tagging, causing mis-scaled or washed-out assets",
  "Compressed-geometry or Basis extensions fail silently in viewers that lack decoders",
  "Vertex colors, KHR_materials_emissive_strength or unlit materials are interpreted differently across renderers",
  "Large scenes in a single JSON file load slowly; there is no built-in streaming or LOD"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "url:https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html",
   "type": "web",
   "title": "glTF 2.0 Specification",
   "authors": [
    "The Khronos® 3D Formats Working Group"
   ],
   "year": null,
   "venue": "registry.khronos.org",
   "url": "https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html",
   "ids": {},
   "license": null,
   "extra": {
    "http_status": 200,
    "live": true,
    "archive": {
     "url": "http://web.archive.org/web/20261117155424/https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html",
     "timestamp": "20261117155424"
    },
    "page_title": "glTF™ 2.0 Specification",
    "host": "registry.khronos.org",
    "title_confirmed_by_page": true,
    "title_unconfirmed": false
   },
   "provenance": {
    "title": {
     "authority": "http",
     "endpoint": "GET https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "http",
     "endpoint": "GET https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "http",
     "endpoint": "GET https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "http",
     "endpoint": "GET https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html → 200",
     "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.75,
   "__bib": "groupgltf"
  },
  {
   "role": "implementation",
   "key": "gh:khronosgroup/gltf-sample-viewer",
   "type": "code",
   "title": "KhronosGroup/glTF-Sample-Viewer",
   "description": "Physically-Based Rendering in glTF 2.0 using WebGL",
   "authors": [
    "KhronosGroup"
   ],
   "year": 2017,
   "venue": "GitHub",
   "url": "https://github.com/KhronosGroup/glTF-Sample-Viewer",
   "ids": {
    "repo": "KhronosGroup/glTF-Sample-Viewer"
   },
   "license": "Apache-2.0",
   "extra": {
    "stars": 1495,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": false,
    "pushed_at": "2026-11-27T17:20:28Z",
    "language": "JavaScript",
    "homepage": null,
    "license_name": "Apache License 2.0"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/KhronosGroup/glTF-Sample-Viewer",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/KhronosGroup/glTF-Sample-Viewer",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/KhronosGroup/glTF-Sample-Viewer",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/KhronosGroup/glTF-Sample-Viewer",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/KhronosGroup/glTF-Sample-Viewer",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/KhronosGroup/glTF-Sample-Viewer",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "khronosgroup2017khronosgroup"
  },
  {
   "role": "implementation",
   "key": "gh:donmccurdy/gltf-transform",
   "type": "code",
   "title": "donmccurdy/glTF-Transform",
   "description": "glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.",
   "authors": [
    "donmccurdy"
   ],
   "year": 2018,
   "venue": "GitHub",
   "url": "https://github.com/donmccurdy/glTF-Transform",
   "ids": {
    "repo": "donmccurdy/glTF-Transform"
   },
   "license": "MIT",
   "extra": {
    "stars": 2109,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": false,
    "pushed_at": "2026-10-20T11:41:51Z",
    "language": "TypeScript",
    "homepage": "https://gltf-transform.dev",
    "license_name": "MIT License"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/donmccurdy/glTF-Transform",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/donmccurdy/glTF-Transform",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/donmccurdy/glTF-Transform",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/donmccurdy/glTF-Transform",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/donmccurdy/glTF-Transform",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/donmccurdy/glTF-Transform",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "donmccurdy2018donmccurdy"
  },
  {
   "role": "secondary",
   "key": "gh:khronosgroup/gltf",
   "type": "code",
   "title": "KhronosGroup/glTF",
   "description": "glTF – Runtime 3D Asset Delivery",
   "authors": [
    "KhronosGroup"
   ],
   "year": 2013,
   "venue": "GitHub",
   "url": "https://github.com/KhronosGroup/glTF",
   "ids": {
    "repo": "KhronosGroup/glTF"
   },
   "license": "NOASSERTION",
   "extra": {
    "stars": 7910,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": false,
    "pushed_at": "2026-11-25T20:16:29Z",
    "language": "HTML",
    "homepage": null,
    "license_name": "Other"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/KhronosGroup/glTF",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/KhronosGroup/glTF",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/KhronosGroup/glTF",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/KhronosGroup/glTF",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/KhronosGroup/glTF",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/KhronosGroup/glTF",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "khronosgroup2013khronosgroup"
  }
 ],
 "presets": [
  {
   "id": "gltf-2-0-live",
   "title": "glTF 2.0 PBR Asset Format — raw metallic-roughness + tangent normal channels (left) vs full Khronos PBR + KHR_materials_clearcoat render (right)",
   "runtime": "glsl-fragment",
   "params": {
    "P_METALLIC": 0.78,
    "P_ROUGHNESS": 0.28,
    "P_CLEARCOAT": 0.65,
    "P_SPLIT": 0.45
   },
   "basis": "original",
   "license_note": "MIT — written for this index.",
   "code": "const float P_METALLIC = 0.78; // P Metallic Factor [0.0, 1.0, 0.02]\nconst float P_ROUGHNESS = 0.28; // P Roughness Factor [0.08, 0.90, 0.02]\nconst float P_CLEARCOAT = 0.65; // P KHR Clearcoat [0.0, 1.0, 0.05]\nconst float P_SPLIT = 0.45; // P PBR Channels / Final [0.0, 1.0, 0.02]\n\nvec2 rot2(vec2 p, float a) {\n  float c = cos(a);\n  float s = sin(a);\n  return vec2(c * p.x - s * p.y, s * p.x + c * p.y);\n}\n\nfloat D_GGX(float ndh, float a) {\n  float a2 = a * a;\n  float d = ndh * ndh * (a2 - 1.0) + 1.0;\n  return a2 / max(3.1415926 * d * d, 1e-5);\n}\n\nfloat G_Smith(float ndv, float ndl, float a) {\n  float k = (a + 1.0) * (a + 1.0) * 0.125;\n  float gv = ndv / max(ndv * (1.0 - k) + k, 1e-4);\n  float gl = ndl / max(ndl * (1.0 - k) + k, 1e-4);\n  return gv * gl;\n}\n\nvec3 F_Schlick(float cosT, vec3 f0) {\n  return f0 + (1.0 - f0) * pow(clamp(1.0 - cosT, 0.0, 1.0), 5.0);\n}\n\nvec3 evalStudioIBL(vec3 r, float rough) {\n  vec3 sky = mix(vec3(0.08, 0.10, 0.15), vec3(0.45, 0.56, 0.72), smoothstep(-0.25, 0.7, r.y));\n  float panel1 = smoothstep(0.65 - rough * 0.25, 0.92, dot(r, normalize(vec3(0.6, 0.65, 0.45))));\n  float panel2 = smoothstep(0.60 - rough * 0.25, 0.90, dot(r, normalize(vec3(-0.75, 0.35, 0.55))));\n  float horizon = exp(-abs(r.y) * mix(16.0, 3.0, rough)) * 0.45;\n  return sky + vec3(2.2, 1.95, 1.65) * panel1 + vec3(0.55, 0.85, 1.25) * panel2 + vec3(0.75, 0.82, 0.92) * horizon;\n}\n\nvec3 aces(vec3 x) {\n  x = max(x, 0.0);\n  return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);\n}\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;\n  float screenX = fragCoord.x / max(iResolution.x, 1.0);\n  float split = clamp(P_SPLIT, 0.0, 1.0);\n  float metFactor = clamp(P_METALLIC, 0.0, 1.0);\n  float rghFactor = clamp(P_ROUGHNESS, 0.06, 0.95);\n  float coatFactor = clamp(P_CLEARCOAT, 0.0, 1.0);\n\n  vec3 ro = vec3(0.0, 0.25, 2.35);\n  vec3 rd = normalize(vec3(uv.x, uv.y - 0.06, -1.52));\n  vec3 col = evalStudioIBL(rd, 0.55) * 0.35;\n\n  // Classic glTF 2.0 Khronos DamagedHelmet-inspired center hero sphere + flanking dielectric/metal reference spheres\n  vec3 pos[3];\n  float rad[3];\n  pos[0] = vec3(0.0, 0.04, 0.05); rad[0] = 0.44;\n  pos[1] = vec3(-0.68, -0.14, -0.12); rad[1] = 0.24;\n  pos[2] = vec3(0.68, -0.14, -0.12); rad[2] = 0.24;\n\n  float tMin = 1e5;\n  int hitId = -1;\n  vec3 hp = vec3(0.0);\n  vec3 hn = vec3(0.0, 1.0, 0.0);\n\n  if (rd.y < -0.005) {\n    float tf = (-0.42 - ro.y) / rd.y;\n    if (tf > 0.05 && tf < 14.0) {\n      tMin = tf; hitId = 10; hp = ro + rd * tf; hn = vec3(0.0, 1.0, 0.0);\n    }\n  }\n  for (int i = 0; i < 3; i++) {\n    vec3 oc = ro - pos[i];\n    float b = dot(oc, rd);\n    float d = b * b - (dot(oc, oc) - rad[i] * rad[i]);\n    if (d > 0.0) {\n      float ts = -b - sqrt(d);\n      if (ts > 0.05 && ts < tMin) {\n        tMin = ts; hitId = i; hp = ro + rd * ts; hn = normalize(hp - pos[i]);\n      }\n    }\n  }\n\n  if (hitId >= 0) {\n    vec3 v = -rd;\n    vec3 n = hn;\n    vec3 baseColor = vec3(0.75);\n    float metallic = metFactor;\n    float roughness = rghFactor;\n    vec3 emissive = vec3(0.0);\n\n    if (hitId == 10) {\n      vec2 g = hp.xz * 2.4;\n      float chk = mod(floor(g.x) + floor(g.y), 2.0);\n      baseColor = mix(vec3(0.16, 0.18, 0.22), vec3(0.32, 0.35, 0.40), chk);\n      metallic = 0.10;\n      roughness = 0.42;\n    } else if (hitId == 0) {\n      vec3 lp = hn;\n      lp.xz = rot2(lp.xz, iTime * 0.45);\n      // Procedural panel seams & emissive visor band (classic glTF 2.0 packed textures)\n      float panel = smoothstep(0.03, 0.09, abs(sin(lp.x * 12.0)) * abs(sin(lp.y * 10.0)));\n      float visor = smoothstep(0.18, 0.06, abs(lp.y - 0.08)) * smoothstep(-0.1, 0.35, lp.z);\n      baseColor = mix(vec3(0.14, 0.16, 0.20), vec3(0.88, 0.66, 0.30), panel);\n      baseColor = mix(baseColor, vec3(0.06, 0.09, 0.14), visor);\n      metallic = mix(0.25, metFactor, panel);\n      roughness = mix(0.55, rghFactor, panel);\n      // Micro normal perturbation along panel seams\n      n = normalize(hn + vec3(cos(lp.x * 12.0), cos(lp.y * 10.0), 0.0) * 0.09 * (1.0 - panel));\n      emissive = vec3(0.18, 0.92, 1.0) * smoothstep(0.05, 0.015, abs(lp.y - 0.08)) * smoothstep(0.0, 0.35, lp.z) * 1.4;\n    } else if (hitId == 1) {\n      baseColor = vec3(0.88, 0.24, 0.20);\n      metallic = 0.04;\n      roughness = 0.22;\n    } else {\n      baseColor = vec3(0.92, 0.78, 0.48);\n      metallic = 0.96;\n      roughness = 0.18;\n    }\n\n    if (screenX < split) {\n      // Left: glTF 2.0 packed buffer attribute breakdown (top half = normal map, bottom half = R:AO G:Roughness B:Metallic!)\n      if (uv.y > 0.02) {\n        col = n * 0.5 + 0.5;\n      } else {\n        float ao = (hitId == 10) ? smoothstep(0.18, 0.65, length(hp.xz)) : (0.5 + 0.5 * n.y);\n        col = vec3(ao, roughness, metallic);\n      }\n    } else {\n      // Right: Spec-compliant glTF 2.0 metallic-roughness BRDF + KHR_materials_clearcoat + emissive\n      vec3 l = normalize(vec3(0.62 * cos(iTime * 0.35), 0.75, 0.55));\n      vec3 h = normalize(l + v);\n      float ndl = max(dot(n, l), 0.0);\n      float ndv = max(dot(n, v), 0.001);\n      float ndh = max(dot(n, h), 0.0);\n      float vdh = max(dot(v, h), 0.0);\n\n      vec3 f0 = mix(vec3(0.04), baseColor, metallic);\n      float a = roughness * roughness;\n      vec3 F = F_Schlick(vdh, f0);\n      float D = D_GGX(ndh, a);\n      float G = G_Smith(ndv, ndl, roughness);\n      vec3 specDir = (D * G * F) / max(4.0 * ndv * ndl, 0.001);\n      vec3 kD = (1.0 - F) * (1.0 - metallic);\n      vec3 direct = (kD * baseColor / 3.1415926 + specDir) * vec3(2.4, 2.25, 2.0) * ndl;\n\n      vec3 r = reflect(-v, n);\n      vec3 envSpec = evalStudioIBL(r, roughness) * F_Schlick(ndv, f0);\n      vec3 envDiff = evalStudioIBL(n, 0.9) * baseColor * (1.0 - metallic) * 0.35;\n\n      // KHR_materials_clearcoat secondary specular lobe (IOR 1.5 -> F0 = 0.04, low roughness)\n      float coatA = 0.06 * 0.06;\n      float coatD = D_GGX(ndh, coatA);\n      float coatF = 0.04 + 0.96 * pow(1.0 - ndv, 5.0);\n      vec3 coatSpec = (vec3(coatD * 0.25 * ndl) + evalStudioIBL(r, 0.06) * coatF) * coatFactor * (hitId == 10 ? 0.1 : 0.85);\n\n      col = direct + envDiff + envSpec + coatSpec + emissive;\n      if (hitId == 10) col = mix(evalStudioIBL(rd, 0.55) * 0.35, col, exp(-tMin * 0.14));\n    }\n  }\n\n  float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));\n  col = mix(col, vec3(0.95, 0.98, 1.0), sep);\n  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);\n}",
   "execution_fidelity": "conceptual-diagram",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-30",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "gltf-2-0",
     "runtime": "glsl-fragment",
     "checked_at": "2026-11-30T21:07:11.000Z",
     "renderer": "Headless EGL Tesla T4/PCIe/SSE2, OpenGL 3.30 Core, 512×512, iTime=1.5",
     "stats": {
      "mean": 0.585,
      "std": 0.1644,
      "min": 0.1051,
      "max": 1
     },
     "image": "/specimens/gltf-2-0-live.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "meshoptimizer",
  "draco-mesh-compression",
  "basis-universal-ktx2",
  "materialx",
  "openpbr-surface",
  "khronos-pbr-neutral"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [
  {
   "id": "meshoptimizer",
   "why": "glTF's EXT_meshopt_compression stores buffers in meshoptimizer's encoded form for smaller downloads."
  },
  {
   "id": "basis-universal-ktx2",
   "why": "KHR_texture_basisu lets glTF reference KTX2 textures that transcode to the GPU's native block format."
  }
 ],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/performance/gltf-2-0.json"
 },
 "solves": [
  "need one format to move 3d assets to the web",
  "exported model looks different in each viewer",
  "reduce download size of a 3d model",
  "pbr material interchange between blender and three.js",
  "load animated skinned characters in a browser"
 ],
 "authority": "Group",
 "url": "https://texelatlas.vercel.app/t/gltf-2-0/",
 "execution_fidelity": "conceptual-diagram",
 "fidelity_label": "Visual Diagram",
 "benchmark_eligible": false,
 "gpu_weight": {
  "weight_x": 4.23,
  "tier": "light",
  "p50_ms": 0.1393,
  "p95_ms": 0.1433,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 32,
  "preset_id": "gltf-2-0-live",
  "execution_fidelity": "conceptual-diagram",
  "fidelity_label": "Visual Diagram",
  "benchmark_eligible": false,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 3.26,
   "tier": "light",
   "p50_ms": 0.0519,
   "p95_ms": 0.0533,
   "speedup_x": 2.68,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 3,
   "tier": "light",
   "p50_ms": 0.0863,
   "p95_ms": 0.1113,
   "speedup_x": 1.61,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}