XRProjectionLayer
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
TheXRProjectionLayer interface of theWebXR Device API is a layer that fills the entire view of the observer and is refreshed close to the device's native frame rate.
XRProjectionLayer is supported by allXRSession objects (nolayers feature descriptor is needed).
To create a newXRProjectionLayer, callXRWebGLBinding.createProjectionLayer().To present layers to the XR device, add them to thelayers render state usingXRSession.updateRenderState().
XRProjectionLayer objects don't have an associatedXRSpace, because they render to the full frame.
In this article
Instance properties
Inherits properties from its parent,XRCompositionLayer andEventTarget.
XRProjectionLayer.fixedFoveationExperimentalA number indicating the amount of foveation used by the XR compositor for the layer. Fixed Foveated Rendering (FFR) renders the edges of the eye textures at a lower resolution than the center and reduces the GPU load.
XRProjectionLayer.ignoreDepthValuesRead onlyExperimentalA boolean indicating that the XR compositor is not making use of depth buffer values when rendering the layer.
XRProjectionLayer.textureArrayLengthRead onlyExperimentalThe layer's layer count for array textures when using
texture-arrayas thetextureType.XRProjectionLayer.textureHeightRead onlyExperimentalThe height in pixels of the color textures of this layer.
XRProjectionLayer.textureWidthRead onlyExperimentalThe width in pixels of the color textures of this layer.
Instance methods
Inherits methods from its parents,XRCompositionLayer andEventTarget.
Specifications
| Specification |
|---|
| WebXR Layers API Level 1> # xrprojectionlayertype> |