You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typedef (ImageBitmap or
ImageData or
HTMLImageElement or
HTMLCanvasElement or
HTMLVideoElement or
OffscreenCanvas or
VideoFrame) TexImageSource;
The exact process of converting source pixel values to the target texture format is not fully defined. This issue lists several previously-identified areas that should be clarified.
Color space conversions:
Assuming that UNPACK_COLORSPACE_CONVERSION_WEBGL is set to BROWSER_DEFAULT_WEBGL, are there any guarantees that when the image's detected color space and the context's unpackColorSpace parameter match, there would be no conversion?
Should implementations issue console warnings when the color space conversion narrows the range, thus likely clamps the original values (e.g., a P3 image uploaded with unpackColorSpace set to sRGB)?
There should be tests for colorspace conversions from Canvas sources.
Bit depth conversions. When the number of bits per channel does not match between the source image and the target GPU format, how exactly the conversion is performed? The spec has a few relevant statements but they do not cover all cases. In particular:
Handling of RGB10_A2 (original values are likely rescaled to target precision)
Handling of *UI formats for less-than-8-bit sources (e.g., 1/2/4-bit PNG)
Handling of images with more than 8 bits per channel, e.g., 16-bit PNG, uploaded to GPU formats with fewer bits