diff --git a/webxrlayers-1.bs b/webxrlayers-1.bs index 90ec2b8..cdbc143 100755 --- a/webxrlayers-1.bs +++ b/webxrlayers-1.bs @@ -54,6 +54,7 @@ spec: webxr; type: dfn; text: primary view type: dfn; text: secondary view type: dfn; text: active; for: view + type: enum-value; text: local spec: html; type: dfn; text: check the usability of the image argument type: dfn; text: request the xr permission @@ -275,7 +276,7 @@ navigator.xr.requestSession('immersive-vr', { Layers are only supported for XRSessions created with XRSessionMode of {{XRSessionMode/"immersive-vr"}} -or {{XRSessionMode/"immersive-ar"}}. {{XRSessionMode/"inline"}} sessions MUST not support layers. +or {{XRSessionMode/"immersive-ar"}}. {{XRSessionMode/"inline"}} sessions MUST NOT support layers. The "[=feature descriptor/layers=]" [=feature descriptor=] has a [=feature requirement=] that it cannot be enabled when there is an [=active immersive session=]. @@ -460,7 +461,7 @@ XRProjectionLayer {#xrprojectionlayertype} An {{XRProjectionLayer}} is a layer that fills the entire view of the observer. Projection layers should be refreshed close to the device's native frame rate. -representation of a projection layer +representation of a projection layer
 [Exposed=Window] interface XRProjectionLayer : XRCompositionLayer {
@@ -513,12 +514,12 @@ The {{XRProjectionLayer/deltaPose}} should be identity when there is no transfor
 XRQuadLayer {#xrquadlayertype}
 -----------
 An {{XRQuadLayer}} renders a layer that takes up a flat rectangular space in the virtual environment.
-Only the front of the layer MUST be visible; the back face MUST not be drawn by the [=XR Compositor=].
+Only the front of the layer MUST be visible; the back face MUST NOT be drawn by the [=XR Compositor=].
 
 A XRQuadLayer has no thicknes. It is a two-dimensional object positioned and oriented in 3D space. The position
 of a quad refers to the center of the quad.
 
-representation of a quad layer
+representation of a quad layer
 
 
 [Exposed=Window] interface XRQuadLayer : XRCompositionLayer {
@@ -562,9 +563,9 @@ The onredraw attribute is an Event handle
 XRCylinderLayer {#xrcylinderayertype}
 ---------------
 An {{XRCylinderLayer}} renders a layer that takes up a curved rectangular space in the virtual environment.
-Only the front of the layer MUST be visible; the back face MUST not be drawn by the [=XR Compositor=].
+Only the front of the layer MUST be visible; the back face MUST NOT be drawn by the [=XR Compositor=].
 
-representation of a cylinder layer
+representation of a cylinder layer
 
 A XRCylinderLayer has no thicknes. It is a two-dimensional object positioned and oriented in 3D space. The position
 of the cylinder refers to the center of the quad.
@@ -595,7 +596,7 @@ It grows symmetrically around the 0 angle.
 
 The aspectRatio attribute controls the ratio of the visible cylinder section. It is the ratio of the width of the visible section of the cylinder divided by its height. The width is calculated by multiplying the {{XRCylinderLayer/radius}} with the {{XRCylinderLayer/centralAngle}}.
 
-description of the parameters of a cylinder layer
+description of the parameters of a cylinder layer
 
 
When initializing an {{XRCylinderLayer}} |layer| with an {{XRCylinderLayerInit}} |init|, the user agent MUST run the following steps: @@ -620,7 +621,7 @@ XREquirectLayer {#xrequirectlayertype} --------------- An {{XREquirectLayer}} renders a layer where the [=XR Compositor=] MUST map an equirectangular coded data onto the inside of a sphere. -representation of an equirect layer +representation of an equirect layer ISSUE: this section needs clarification @@ -656,7 +657,7 @@ a value higher than 2π will set it to 2π. Setting {{XREquirectLayer/upperVerticalAngle}} or {{XREquirectLayer/lowerVerticalAngle}} to a value less than -π/2 will set it to -π/2 and setting it to a value higher than π/2 will set it to π/2. -description of the parameters of an equirect layer +description of the parameters of an equirect layer When assigning an {{XRSpace}} to the {{XREquirectLayer/space}} attribute, first run the following steps. @@ -693,7 +694,7 @@ XRCubeLayer {#xcubelayertype} ----------- A {{XRCubeLayer}} renders a layer where the [=XR Compositor=] renders directly from a cubemap. -representation of a cube layer +representation of a cube layer ISSUE: this section needs clarification @@ -909,6 +910,11 @@ section in the OpenGL ES 3.0 spec defines these limitations in more detail. Allocation of the resources for layers (such as memory) MUST be done through the same mechanism as WebGL. +If an {{XRLayer}} is allocated with the {{RGBA}} or {{RGB}} {{XRLayerInit/colorFormat}}, its [=colorTextures=] MUST be exposed as {{RGBA}} or {{RGB}} to the {{WebGLRenderingContext}} context. +However, the [=XR Compositor=] MUST treat the [=colorTextures=]'s pixels as if they were in the {{SRGB8_ALPHA8}} or {{SRGB8}} {{XRLayerInit/colorFormat}}. + +NOTE: this means that the [=XR Compositor=] MUST NOT do any gamma conversion from linear {{RGBA}} or {{RGB}} when it processes the [=colorTextures=]. Otherwise, the pixels in the final rendering will appear too bright which will not match the rendering on a regular 2D {{WebGLRenderingContext}} context. + XRProjectionLayerInit {#xrprojectionlayerinittype} --------------------- The {{XRProjectionLayerInit}} dictionary represents a set of configurable values that describe how an {{XRProjectionLayer}} @@ -2144,7 +2150,7 @@ Timing of the composition {#xrcompositiontiming} ------------------------- Composition timing MUST be independent of the content that is rendered. -Moreover, content in a layer MUST not be observable in other layers. +Moreover, content in a layer MUST NOT be observable in other layers. If possible, composition of layers should happen outside the browser to reduce risk of timing attacks or other security vulnerabilities.