Skip to content

Commit

Permalink
UNPACK_COLORSPACE_CONVERSION_WEBGL now applies to all inputs, not jus…
Browse files Browse the repository at this point in the history
…t images. (#3689)

UNPACK_COLORSPACE_CONVERSION_WEBGL now applies to all inputs, not just images, but is
restricted to TexImageSource. (excludes e.g. ArrayBufferViews)

Fixes #3683.
  • Loading branch information
kdashg authored Sep 19, 2024
1 parent 5824354 commit 2652500
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions specs/latest/1.0/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2769,7 +2769,7 @@ <h4>Texture objects</h4>

First, the source image data is conceptually converted to the color space specified by
the <a href="#DOM-WebGLRenderingContext-unpackColorSpace">unpackColorSpace</a>
attribute, except if the source image data is an <code>HTMLImageElement</code>, and
attribute, except if the
the <code>UNPACK_COLORSPACE_CONVERSION_WEBGL</code> pixel storage parameter is set
to <code>NONE</code>. <br><br>

Expand Down Expand Up @@ -4125,10 +4125,14 @@ <h3><a name="PIXEL_STORAGE_PARAMETERS">Pixel Storage Parameters</a></h3>

<dt><code>UNPACK_COLORSPACE_CONVERSION_WEBGL</code> of type <code>unsigned long</code>
<dd>If set to <code>BROWSER_DEFAULT_WEBGL</code>, then the browser's default colorspace conversion
is applied during subsequent <code>texImage2D</code> and <code>texSubImage2D</code> calls
taking <code>HTMLImageElement</code>. The precise conversions may be specific to both the browser
and file type. If set to <code>NONE</code>, no colorspace conversion is applied. The initial value
is <code>BROWSER_DEFAULT_WEBGL</code>.
(e.g. converting a display-p3 image to srgb)
is applied during subsequent texture data upload calls
(e.g. <code>texImage2D</code> and <code>texSubImage2D</code>) that take an argument of TexImageSource.

The precise conversions may be specific to both the browser and file type.
If set to <code>NONE</code>, no colorspace conversion is applied, other than conversion to RGBA.
(For example, a rec709 YUV video is still converted to rec709 RGB data, but not then converted to e.g. srgb RGB data)
The initial value is <code>BROWSER_DEFAULT_WEBGL</code>.

</dl>

Expand Down

0 comments on commit 2652500

Please sign in to comment.