Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions webxrlayers-1.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ To <dfn>initialize the viewport</dfn> of an {{XRViewport}} |viewport| with a [=o
<dl class="switch">
<dt class="switch">If |layout| is {{XRLayerLayout/"stereo-left-right"}}:
<dd> Set |viewport|'s {{XRViewport/x}} to the pixel width of |texture| multiplied by |offset| and divided by |num|.
<dd> Set |viewport|'s {{XRViewport/width}} to half the pixel width of |subimage|'s |texture| divided by |num|.
<dd> Set |viewport|'s {{XRViewport/width}} to the pixel width of |subimage|'s |texture| divided by |num|.
<dt class="switch">Else if |layout| is {{XRLayerLayout/"stereo-top-bottom"}}:
<dd> Set |viewport|'s {{XRViewport/y}} to the pixel height of |texture| multiplied by |offset| and divided by |num|.
<dd> Set |viewport|'s {{XRViewport/height}} to the pixel height of |subimage|'s |texture| divided by |num|.
Expand Down Expand Up @@ -1582,25 +1582,31 @@ When this method is invoked on an {{XRWebGLBinding}} |binding|, it MUST run the
<dt> Otherwise
<dd> Let |index| be the offset of |view|'s [=view=] in |session|'s [=list of views=] excluding the [=secondary view|secondary views=].
</dl>
1. Let |layout| be |layer|'s {{XRCompositionLayer/layout}}.
1. Initialize |subimage|'s {{XRWebGLSubImage/imageIndex}} with <code>0</code>.
1. Initialize |subimage|'s {{XRWebGLSubImage/imageIndex}} as follows:
<dl class="switch">
<dt> If the |layer| was created with a textureType of {{"texture-array"}}:
<dd> Initialize |subimage|'s {{XRWebGLSubImage/imageIndex}} with |index|.
<dt> Otherwise
<dd> Initialize |subimage|'s {{XRWebGLSubImage/imageIndex}} with <code>0</code>.
</dl>
1. Initialize |subimage|'s {{XRWebGLSubImage/colorTexture}} as follows:
<dl class="switch">
<dt> If |view| is a [=secondary view=] from |session|'s [=list of views=]
<dd> Initialize |subimage|'s {{XRWebGLSubImage/colorTexture}} with the element at offset |index| of the |layer|'s [=XRProjectionLayer/colorTextures for secondary views=].
<dd> Initialize |subimage|'s {{XRWebGLSubImage/imageIndex}} with <code>0</code>.
<dt> Else if the |layer| was created with a textureType of {{"texture-array"}}
<dt> Else if the |layer| was created with a textureType of {{"texture-array"}} or if |layout| is {{XRLayerLayout/"stereo-left-right"}} or {{XRLayerLayout/"stereo-top-bottom"}}
<dd> Initialize |subimage|'s {{XRWebGLSubImage/colorTexture}} with the first element of the |layer|'s [=colorTextures=] array.
<dd> Initialize |subimage|'s {{XRWebGLSubImage/imageIndex}} with |index|.
<dt> Otherwise
<dd> Initialize |subimage|'s {{XRWebGLSubImage/colorTexture}} with the element at offset |index| of the |layer|'s [=colorTextures=] array.
<dd> Initialize |subimage|'s {{XRWebGLSubImage/imageIndex}} with <code>0</code>.
</dl>
1. Initialize |subimage|'s {{XRWebGLSubImage/depthStencilTexture}} as follows:
<dl class="switch">
<dt> If the |layer|'s [=depthStencilTextures=] is an empty array.
<dd> Initialize |subimage|'s {{XRWebGLSubImage/depthStencilTexture}} with <code>null</code>.
<dt> Else if |view| is a [=secondary view=] from |session|'s [=list of views=]
<dd> Initialize |subimage|'s {{XRWebGLSubImage/colorTexture}} with the element at offset |index| of the |layer|'s [=XRProjectionLayer/depthStencilTextures for secondary views=].
<dt> Else if the |layer| was created with a textureType of {{"texture-array"}}
<dt> Else if the |layer| was created with a textureType of {{"texture-array"}} or if |layout| is {{XRLayerLayout/"stereo-left-right"}} or {{XRLayerLayout/"stereo-top-bottom"}}
<dd> Initialize |subimage|'s {{XRWebGLSubImage/depthStencilTexture}} with the first element of |layer|'s [=depthStencilTextures=] array.
<dt> Otherwise
<dd> Initialize |subimage|'s {{XRWebGLSubImage/depthStencilTexture}} with the element at offset |index| of the |layer|'s [=depthStencilTextures=] array.
Expand Down