v144 · device
XRVisibilityMaskChange
Adds an XRVisibilityMaskChange event that will provide a list of vertices and a list of indices to represent the mesh of the visible portion of the user's viewport. This data can then be used to confidently limit the amount of the viewport drawn to in order to improve performance. To better support this event, XRView's are also given unique identifiers to al
concepts
-
Visibility Mask
WebXR can now notify the page when the headset's visibility mask changes — sites can stop rendering pixels that won't reach the user's eyes, saving GPU.
-
Foveated Render Probe
Visualise a typical headset visibility mask and probe the XR session API. Foveated renderers use this mask to skip shading the periphery.
-
Mask Inspector
Pick a real headset profile (Quest 3, Vision Pro, Index, Vive Pro 2, Quest 1), see the visibility mask overlaid on a frame, read off how many pixels per eye your GPU would skip at 90Hz.
-
Mask Mesh Inspector
Step through four headset visibility mask shapes — circular, oval, binocular cutout, and full rectangle. For each shape the mesh is rendered, vertex positions shown in an interactive table, and fill efficiency calculated: the exact percentage of pixels that can be skipped per frame.
why it shipped
Without this change, pages are forced to draw to the full texture provided for the corresponding viewport, when portions of this viewport will not even be visible to the user, resulting in wasted work. By providing an event to describe the clipped-to area of the viewport, developers can save on per-frame work, and improve performance of their experiences, by reducing the required fill rate by 5-10% depending on device. This is given as an event because some system-level functionality may in fact capture the entire viewport, and thus those systems would like to toggle between having developers