---
id: "foveated-rendering-vrs"
title: "Foveated Rendering & Variable Rate Shading (VRS)"
aliases: [VRS, Eye-Tracked Foveated Rendering]
domain: "performance"
stage: "performance"
realtime: "realtime"
platforms: [desktop-gpu, mobile-gpu]
year_introduced: 2012
inputs: [gbuffer, depth]
outputs: [hdr-image]
style: "both"
dynamic: "dynamic"
cost: "cheap"
authority: "Guenter et al., 2012"
url: "https://texelatlas.vercel.app/t/foveated-rendering-vrs/"
sources_verified_at: "2026-12-02"
---
# Foveated Rendering & Variable Rate Shading (VRS) (Guenter et al., 2012)

> 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 it

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

cheap — 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

## Engine support

- babylonjs: builtin — `WebXRFeatureName.LAYERS / fixedFoveation on WebXRDefaultExperience` (evidence: https://github.com/BabylonJS/Babylon.js/blob/master/packages/dev/core/src/XR/webXRLayerWrapper.ts, checked 2026-12-02)
- godot: builtin — `Viewport.vrs_mode = Viewport.VRS_XR or VRS_TEXTURE` (evidence: https://docs.godotengine.org/en/stable/classes/class_viewport.html, checked 2026-12-02)
- metal: builtin — `MTLRasterizationRateMapDescriptor / MTLRenderPassDescriptor.rasterizationRateMap` (evidence: https://developer.apple.com/tutorials/data/documentation/metal/rendering-at-different-rasterization-rates.json, checked 2026-12-02)
- threejs: builtin — `renderer.xr.setFoveation(1.0) on WebXRManager` (evidence: https://github.com/mrdoob/three.js/blob/dev/src/renderers/webxr/WebXRManager.js, checked 2026-12-02)
- unity: builtin — `XRDisplaySubsystem.foveatedRenderingLevel and Variable Rate Shading` (evidence: https://docs.unity3d.com/6000.0/Documentation/ScriptReference/XR.XRDisplaySubsystem-foveatedRenderingLevel.html, checked 2026-12-02)
- unreal: builtin — `r.VRS.Enable / Variable Rate Shading & Eye-Tracked Foveated Rendering` (evidence: https://dev.epicgames.com/documentation/en-us/unreal-engine/xr-performance-features-in-unreal-engine, checked 2026-12-02)

## Dataflow

- Inputs: gbuffer, depth
- Outputs: hdr-image
- Platforms: desktop-gpu, mobile-gpu

## Presets

### Foveated Rendering / VRS — concentric 1×1, 2×2, and 4×4 shading-rate rings following gaze (glsl-fragment; rendered 2026-12-02)

```json
{
  "P_FOVEA_RAD": 0.22,
  "P_MID_RAD": 0.46,
  "P_SHOW_GRID": 1,
  "P_GAZE_SPEED": 0.65
}
```

```glsl
const float P_FOVEA_RAD = 0.22; // P Fovea Radius [0.08, 0.42, 0.01]
const float P_MID_RAD = 0.46; // P Mid-Ring Radius [0.28, 0.72, 0.02]
const float P_SHOW_GRID = 1.0; // P Overlay VRS Rates [0.0, 1.0, 1.0]
const float P_GAZE_SPEED = 0.65; // P Gaze Motion [0.0, 2.0, 0.05]

vec3 shadeScene(vec2 p) {
  float checker = step(0.0, sin(p.x * 48.0) * sin(p.y * 48.0));
  float rings = 0.5 + 0.5 * sin(length(p * 18.0) - iTime * 2.0);
  vec3 base = mix(vec3(0.14, 0.19, 0.28), vec3(0.86, 0.78, 0.64), checker * 0.75 + rings * 0.25);
  float spec = pow(max(0.0, 1.0 - length(p - vec2(0.18, 0.14)) * 2.2), 4.0);
  return base + vec3(0.95, 0.62, 0.32) * spec;
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
  vec2 gaze = vec2(cos(iTime * P_GAZE_SPEED) * 0.32, sin(iTime * P_GAZE_SPEED * 0.7) * 0.16);
  float d = length(uv - gaze);
  float rate = (d < P_FOVEA_RAD) ? 1.0 : (d < P_MID_RAD ? 2.0 : 4.0);
  vec2 qCoord = (floor(fragCoord / rate) + 0.5) * rate;
  vec2 qUv = (qCoord - 0.5 * iResolution.xy) / iResolution.y;
  vec3 col = shadeScene(qUv);
  if (P_SHOW_GRID > 0.5) {
    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));
    col = mix(col, tint, 0.22);
    float r1 = smoothstep(0.008, 0.002, abs(d - P_FOVEA_RAD));
    float r2 = smoothstep(0.008, 0.002, abs(d - P_MID_RAD));
    col = mix(col, vec3(1.0), max(r1, r2) * 0.85);
    float crossHair = max(smoothstep(0.005, 0.001, abs(uv.x - gaze.x)) * step(abs(uv.y - gaze.y), 0.025),
                          smoothstep(0.005, 0.001, abs(uv.y - gaze.y)) * step(abs(uv.x - gaze.x), 0.025));
    col = mix(col, vec3(1.0), crossHair);
  }
  fragColor = vec4(pow(clamp(col, 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}
```

Attribution: MIT — written for this index.

## Sources

1. [primary] Brian Guenter, Mark Finch, Steven Drucker, Desney Tan, John Snyder (2012) Foveated 3D graphics. ACM Transactions on Graphics. https://doi.org/10.1145/2366145.2366183 (verified via crossref on 2026-12-02)

## Cite this entry

Texel. "Foveated Rendering & Variable Rate Shading (VRS)." https://texelatlas.vercel.app/t/foveated-rendering-vrs/ (accessed 2026-12-02).
