← Back to release summary

XRVisibilityMaskChange

Category
Device
Type
Chromium catches up
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

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 allow easier pairing with the associated masks. This is an extension to the core WebXR specification.

Motivation

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 draw the entire viewport versus only the area visible to the active user.

Standards & signals

Samples: https://github.com/cabanier/three.js/commit/78a3227d95fc29e001d8cd139504c643987430c5

View on chromestatus.com