Foveated Rendering & Variable Rate Shading (VRS)
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.
Also known as VRS, Eye-Tracked Foveated Rendering
In the family Performance, LOD & compression, shading-rate
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | Built in | renderer.xr.setFoveation(1.0) on WebXRManager docs |
| Babylon.js 9.x | Built in | WebXRFeatureName.LAYERS / fixedFoveation on WebXRDefaultExperience docs |
| Godot 4.7 | Built in | Viewport.vrs_mode = Viewport.VRS_XR or VRS_TEXTURE docs |
| Unity 6.0 | Built in | XRDisplaySubsystem.foveatedRenderingLevel and Variable Rate Shading docs |
| Unreal 5.7 | Built in | r.VRS.Enable / Variable Rate Shading & Eye-Tracked Foveated Rendering docs |
| Blender 5.0 | None found | Not exposed as a native built-in variable-rate shading API in this backend. |
| WebGPU W3C | None found | Not exposed as a native built-in variable-rate shading API in this backend. |
| Metal | Built in | MTLRasterizationRateMapDescriptor / MTLRenderPassDescriptor.rasterizationRateMap docs |
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 choose 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.
Field marks
- 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
Presets
Foveated Rendering / VRS — concentric 1×1, 2×2, and 4×4 shading-rate rings following gaze
{
"P_FOVEA_RAD": 0.22,
"P_MID_RAD": 0.46,
"P_SHOW_GRID": 1,
"P_GAZE_SPEED": 0.65
}Show GLSL (33 lines)
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.
Measured GPU weight
Not yet timed in the standardized NVIDIA T4 sweep. Run the browser profiler above, or time all live specimens at 1080p in Google Colab (NVIDIA T4).
Sources
- primaryBrian Guenter, Mark Finch, Steven Drucker, Desney Tan, John Snyder (2012). Foveated 3D graphics. ACM Transactions on Graphics.Verified via crossref · 2026-12-02doi:10.1145/2366145.2366183