-
Notifications
You must be signed in to change notification settings - Fork 688
Open
Description
The WebGL spec defines TexImageSource as follows:
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_WEBGLis set toBROWSER_DEFAULT_WEBGL, are there any guarantees that when the image's detected color space and the context'sunpackColorSpaceparameter 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
unpackColorSpaceset to sRGB)? - There should be tests for colorspace conversions from Canvas sources.
- Assuming that
- 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
*UIformats 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
- Handling of
- Clarify UNPACK_PREMULTIPLY_ALPHA for floating-point and integer pixel formats #3667
Metadata
Metadata
Assignees
Labels
No labels