demo · v144 · WebXR

Foveated Render Probe

A headset reports a per-eye visibility mask — the silhouette the lens actually shows. Renderers can skip the periphery and save GPU. The simulated mask below is what the spec event hands you: a triangle strip in NDC.

navigator.xr: checking…

click "simulate" to draw a typical lens silhouette…

the API

const layer = session.renderState.baseLayer;
const mask = layer.getVisibilityMask?.(viewerPose.views[0]);
session.addEventListener("visibilitymaskchange", e => {
  // re-fetch mask, upload to GPU stencil
});

see also