Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The read-only data
property of the XRCPUDepthInformation
interface is an ArrayBuffer
containing depth-buffer information in raw format.
The data is stored in row-major format, without padding, with each entry corresponding to distance from the view's near plane to the users' environment, in unspecified units. The size of each data entry and the type is determined by depthDataFormat
. The values can be converted from unspecified units to meters by multiplying them by rawValueToMeters
. The normDepthBufferFromNormView
property can be used to transform from normalized view coordinates (an origin in the top left corner of the view, with X axis growing to the right, and Y axis growing downward) into the depth buffer's coordinate system.