{
 "id": "foveated-rendering-vrs",
 "title": "Foveated Rendering & Variable Rate Shading (VRS)",
 "aliases": [
  "VRS",
  "Eye-Tracked Foveated Rendering"
 ],
 "domain": "performance",
 "subdomain": "shading-rate",
 "stage": "performance",
 "realtime": "realtime",
 "platforms": [
  "desktop-gpu",
  "mobile-gpu"
 ],
 "year_introduced": 2012,
 "inputs": [
  "gbuffer",
  "depth"
 ],
 "outputs": [
  "hdr-image"
 ],
 "style": "both",
 "dynamic": "dynamic",
 "summary": "Concentrates full 1×1 pixel shading density around the viewer's gaze point (fovea) while stepping down peripheral shading rates to 2×2 or 4×4 blocks via hardware Variable Rate Shading, cutting fragment work 2–5× in XR and high-DPI displays.",
 "how_it_works": "Human visual acuity falls off steeply beyond ~5–15° of eccentricity from the gaze center. Foveated rendering exploits this by keeping geometry rasterization and depth testing at full native resolution (preserving crisp silhouettes) while steering fragment shader invocations via a screen-space VRS attachment (or multi-resolution concentric render layers) that shades peripheral pixels in coarse 2×2 or 4×4 blocks. With eye tracking, the foveal region follows gaze latency-compensated each frame; fixed foveated rendering centers on the lens sweet spot.",
 "when_to_use": "Essential for VR/AR/XR headsets (Vision Pro, Quest, PCVR) and high-resolution 4K/8K fragment-bound pipelines where pixel shading dominates frame time.",
 "cost": {
  "class": "cheap",
  "notes": "Saves 30–70% fragment shader time with minimal hardware VRS attachment overhead."
 },
 "failure_modes": [
  "High-contrast fine textures or specular aliasing in the periphery can shimmer if VRS transitions are too aggressive",
  "Eye-tracker latency >20ms makes the coarse boundary momentarily visible during rapid saccades",
  "Post-processing passes must handle non-uniform shading sharpness cleanly"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "doi:10.1145/2366145.2366183",
   "type": "paper",
   "title": "Foveated 3D graphics",
   "authors": [
    "Brian Guenter",
    "Mark Finch",
    "Steven Drucker",
    "Desney Tan",
    "John Snyder"
   ],
   "year": 2012,
   "venue": "ACM Transactions on Graphics",
   "url": "https://doi.org/10.1145/2366145.2366183",
   "ids": {
    "doi": "10.1145/2366145.2366183"
   },
   "license": null,
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145%2F2366145.2366183",
     "checked_at": "2026-12-02T02:40:24.869Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145%2F2366145.2366183",
     "checked_at": "2026-12-02T02:40:24.869Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145%2F2366145.2366183",
     "checked_at": "2026-12-02T02:40:24.869Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145%2F2366145.2366183",
     "checked_at": "2026-12-02T02:40:24.869Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145%2F2366145.2366183",
     "checked_at": "2026-12-02T02:40:24.869Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-12-02T02:40:24.869Z",
   "title_sim": 1,
   "__bib": "guenter2012foveated"
  }
 ],
 "presets": [
  {
   "id": "foveated-rendering-vrs-live",
   "title": "Foveated Rendering / VRS — concentric 1×1, 2×2, and 4×4 shading-rate rings following gaze",
   "runtime": "glsl-fragment",
   "params": {
    "P_FOVEA_RAD": 0.22,
    "P_MID_RAD": 0.46,
    "P_SHOW_GRID": 1,
    "P_GAZE_SPEED": 0.65
   },
   "basis": "original",
   "license_note": "MIT — written for this index.",
   "code": "const float P_FOVEA_RAD = 0.22; // P Fovea Radius [0.08, 0.42, 0.01]\nconst float P_MID_RAD = 0.46; // P Mid-Ring Radius [0.28, 0.72, 0.02]\nconst float P_SHOW_GRID = 1.0; // P Overlay VRS Rates [0.0, 1.0, 1.0]\nconst float P_GAZE_SPEED = 0.65; // P Gaze Motion [0.0, 2.0, 0.05]\n\nvec3 shadeScene(vec2 p) {\n  float checker = step(0.0, sin(p.x * 48.0) * sin(p.y * 48.0));\n  float rings = 0.5 + 0.5 * sin(length(p * 18.0) - iTime * 2.0);\n  vec3 base = mix(vec3(0.14, 0.19, 0.28), vec3(0.86, 0.78, 0.64), checker * 0.75 + rings * 0.25);\n  float spec = pow(max(0.0, 1.0 - length(p - vec2(0.18, 0.14)) * 2.2), 4.0);\n  return base + vec3(0.95, 0.62, 0.32) * spec;\n}\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;\n  vec2 gaze = vec2(cos(iTime * P_GAZE_SPEED) * 0.32, sin(iTime * P_GAZE_SPEED * 0.7) * 0.16);\n  float d = length(uv - gaze);\n  float rate = (d < P_FOVEA_RAD) ? 1.0 : (d < P_MID_RAD ? 2.0 : 4.0);\n  vec2 qCoord = (floor(fragCoord / rate) + 0.5) * rate;\n  vec2 qUv = (qCoord - 0.5 * iResolution.xy) / iResolution.y;\n  vec3 col = shadeScene(qUv);\n  if (P_SHOW_GRID > 0.5) {\n    vec3 tint = (rate < 1.5) ? vec3(0.25, 0.9, 0.55) : (rate < 2.5 ? vec3(0.98, 0.78, 0.22) : vec3(0.92, 0.35, 0.32));\n    col = mix(col, tint, 0.22);\n    float r1 = smoothstep(0.008, 0.002, abs(d - P_FOVEA_RAD));\n    float r2 = smoothstep(0.008, 0.002, abs(d - P_MID_RAD));\n    col = mix(col, vec3(1.0), max(r1, r2) * 0.85);\n    float crossHair = max(smoothstep(0.005, 0.001, abs(uv.x - gaze.x)) * step(abs(uv.y - gaze.y), 0.025),\n                          smoothstep(0.005, 0.001, abs(uv.y - gaze.y)) * step(abs(uv.x - gaze.x), 0.025));\n    col = mix(col, vec3(1.0), crossHair);\n  }\n  fragColor = vec4(pow(clamp(col, 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);\n}",
   "execution_fidelity": "conceptual-diagram",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-12-02",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "foveated-rendering-vrs",
     "runtime": "glsl-fragment",
     "checked_at": "2026-12-02T02:47:16.556Z",
     "execution_fidelity": "conceptual-diagram",
     "benchmark_eligible": false,
     "renderer": "Chromium 145.0.7632.6 headless, WebGL2 via ANGLE/SwiftShader, 512×512, iTime∈{0.0,1.5,4.0}",
     "stats": {
      "mean": 0.748,
      "std": 0.1308,
      "unique_colors": 206,
      "nan_pixels": 0,
      "animated": true,
      "anim_delta": 0.0627
     },
     "image": "/specimens/foveated-rendering-vrs-live.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "deferred-shading",
  "temporal-anti-aliasing",
  "visibility-buffer"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [],
 "provenance": {
  "prose": "original text written for this index (frontier expansion, authority-verified)",
  "sources_verified_at": "2026-12-02T02:40:24.869Z"
 },
 "solves": [],
 "authority": "Guenter et al., 2012",
 "url": "https://texelatlas.vercel.app/t/foveated-rendering-vrs/",
 "execution_fidelity": "conceptual-diagram",
 "fidelity_label": "Visual Diagram",
 "benchmark_eligible": false
}