Skip to content

Commit

Permalink
Add projectionMatrix to XRDepthInformation
Browse files Browse the repository at this point in the history
  • Loading branch information
cabanier committed Sep 23, 2024
1 parent b372eb2 commit 44f7ba3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ interface XRDepthInformation {

[SameObject] readonly attribute XRRigidTransform normDepthBufferFromNormView;
readonly attribute float rawValueToMeters;
readonly attribute Float32Array? projectionMatrix;
};
</script>

Expand All @@ -320,6 +321,8 @@ Note: if the applications intend to use the resulting depth buffer for texturing

The {{XRDepthInformation/rawValueToMeters}} attribute contains the scale factor by which the raw depth values from a [=XRDepthInformation/depth buffer=] must be multiplied in order to get the depth in meters.

The optional {{XRDepthInformation/projectionMatrix}} attribute contains the projection matrix that was used when the {{XRSystem}} calculated the {{XRDepthInformation}}. This attribute MAY be used by experiences to better align with the real world. If the {{XRDepthInformation/projectionMatrix}} is not provided, the user MUST assume it is the same as the {{XRView/projectionMatrix}}.

Each {{XRDepthInformation}} has an associated <dfn for=XRDepthInformation>view</dfn> that stores {{XRView}} from which the depth information instance was created.

Each {{XRDepthInformation}} has an associated <dfn for=XRDepthInformation>depth buffer</dfn> that contains depth buffer data. Different {{XRDepthInformation}}s may store objects of different concrete types in the depth buffer.
Expand Down

0 comments on commit 44f7ba3

Please sign in to comment.