From b3f6f2c6b98aaff98f573182d99294987251a29d Mon Sep 17 00:00:00 2001 From: Rik Cabanier Date: Sat, 10 Feb 2024 02:46:14 +0000 Subject: [PATCH] Merge pull request #305 from cabanier/srgb SHA: 6a896daee5b5faab13fa45384572e9f9fca77e1e Reason: push, by cabanier Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- index.html | 1047 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 644 insertions(+), 403 deletions(-) diff --git a/index.html b/index.html index fd00b91..d91fb2d 100644 --- a/index.html +++ b/index.html @@ -5,10 +5,9 @@ WebXR Layers API Level 1 - - + - + - - - - - + - - - + - - +

WebXR Layers API Level 1

-

Editor’s Draft,

+

Editor’s Draft,

More details about this document
@@ -691,7 +755,7 @@

WebXR Layers API Level 1

- +
@@ -715,7 +779,7 @@

made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

-

This document is governed by the 2 November 2021 W3C Process Document.

+

This document is governed by the 03 November 2023 W3C Process Document.

@@ -877,7 +941,7 @@

"immersive-vr" or "immersive-ar". "inline" sessions MUST not support layers.

+

Layers are only supported for XRSessions created with XRSessionMode of "immersive-vr" or "immersive-ar". "inline" sessions MUST NOT support layers.

The "layers" feature descriptor has a feature requirement that it cannot be enabled when there is an active immersive session.

NOTE: This means that executing the request(permissionDesc) API with "layers" will not enable layers support for the current active session.

@@ -1058,7 +1122,7 @@

3.6. XRQuadLayer

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

@@ -1102,7 +1166,7 @@

onredraw attribute is an Event handler IDL attribute for the redraw event type.

3.7. XRCylinderLayer

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

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.

@@ -1380,6 +1444,9 @@

"Immutable-Format Texture Images" 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 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 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.

6.3. XRProjectionLayerInit

The XRProjectionLayerInit dictionary represents a set of configurable values that describe how an XRProjectionLayer is initialized.
dictionary XRProjectionLayerInit {
@@ -1392,12 +1459,12 @@ 

The textureType attribute defines the type of texture that the layer will have.

The colorFormat attribute defines the data type of the color texture data.

-

This is the list of color formats for projection layers that the XR Compositor MUST support:

+

This is the list of color formats for projection layers that the XR Compositor MUST support:

  • -

    RGBA

    +

    RGBA

  • -

    RGB

    +

    RGB

  • SRGB_EXT for contexts with the 'EXT_sRGB' extension enabled

  • @@ -1406,18 +1473,18 @@

    For WebGL2 contexts these additional formats are supported:

    The depthFormat attribute defines the data type of the depth texture data. If depthFormat is 0 the layer will not provide a depth/stencil texture.

    -

    This is the list of depth formats for projection layers that the XR Compositor MUST support:

    -

    For WebGLRenderingContext contexts with the 'WEBGL_depth_texture' extension enabled or WebGL2 contexts:

    +

    This is the list of depth formats for projection layers that the XR Compositor MUST support:

    +

    For WebGLRenderingContext contexts with the 'WEBGL_depth_texture' extension enabled or WebGL2 contexts:

    • DEPTH_COMPONENT

      @@ -1429,9 +1496,9 @@

      For WebGL2RenderingContext contexts these additional formats are supported:

      The scaleFactor attribute defines the value that the session’s recommended WebGL framebuffer resolution MUST be multiplied by determining the resolution of the layer’s attachments.

      The clearOnAccess attribute defines if the texture associated with this layer should be cleared in the initial frame or on every frame.

      @@ -1441,7 +1508,7 @@

      XRLayerInit dictionary represents a set of common configurable values for XRQuadLayer, XRCylinderLayer, XREquirectLayer and XRCubeLayer .
      dictionary XRLayerInit {
         required XRSpace space;
      -  GLenum colorFormat = 0x1908; // RGBA
      +  GLenum colorFormat = 0x1908; // RGBA
         GLenum? depthFormat;
         unsigned long mipLevels = 1;
         required unsigned long viewPixelWidth;
      @@ -1453,12 +1520,12 @@ 

      space attribute defines the spatial relationship with the user’s physical environment.

      The colorFormat attribute defines the data type of the color texture data.

      -

      This is the list of color formats for non-projection layers that the XR Compositor MUST support:

      +

      This is the list of color formats for non-projection layers that the XR Compositor MUST support:

      For contexts with the 'WEBGL_compressed_texture_etc' extension enabled these additional formats are supported:

        @@ -1493,8 +1560,8 @@

        WEBGL_compressed_texture_astc' extension enabled all the formats of that extension are supported.

        The depthFormat attribute defines the data type of the depth texture data. If depthFormat is not supplied, the layer will not provide a depth/stencil texture.

        -

        This is the list of depth formats for non-projection layers that the XR Compositor MUST support:

        -

        For WebGLRenderingContext contexts with the 'WEBGL_depth_texture' extension enabled or WebGL2 contexts:

        +

        This is the list of depth formats for non-projection layers that the XR Compositor MUST support:

        +

        For WebGLRenderingContext contexts with the 'WEBGL_depth_texture' extension enabled or WebGL2 contexts:

        +
      • + [CSS-WRITING-MODES-4] defines the following terms: +
          +
        • end +
      • [DOM] defines the following terms:
          @@ -3355,7 +3427,6 @@

          animationframe
        • baseLayer (for XRRenderState)
        • baseLayer (for XRRenderStateInit) -
        • ended
        • feature descriptor
        • feature requirements
        • height @@ -3402,6 +3473,8 @@

          N
          [COMPOSITING-1]
          Rik Cabanier; Nikos Andronikos. Compositing and Blending Level 1. URL: https://drafts.fxtf.org/compositing-1/ +
          [CSS-WRITING-MODES-4] +
          Elika Etemad; Koji Ishii. CSS Writing Modes Level 4. URL: https://drafts.csswg.org/css-writing-modes-4/
          [DOM]
          Anne van Kesteren. DOM Standard. Living Standard. URL: https://dom.spec.whatwg.org/
          [GEOMETRY-1] @@ -3658,7 +3731,160 @@

          add a better algorithm to describe the drawing.
          define how the XREquirectLayer's parameters affect the video display.
          - + - - + - + \ No newline at end of file