-
Notifications
You must be signed in to change notification settings - Fork 345
Closed
Labels
copyeditingPure editorial stuff (copyediting, *.bs file syntax, etc.)Pure editorial stuff (copyediting, *.bs file syntax, etc.)enhancement
Milestone
Description
We agreed upon a copyToTexture (aka copyFromTextureSource/copyImageBitmapToTexture) for various image sources (ImageBitmap, HTMLCanvasElement, HTMLVideoElement, OffscreenCanvas in #1154). Of note, all of these image sources are color-managed - that is, they represent colors. (IIUC ImageData should be treated as color-managed as well.)
GPUTextures are not color-managed - they represent raw float/int/norm numbers (with optional srgb conversions). This means colorspace conversions can/should occur inside copyToTexture. In order to do this, we need to know (and specify) the destination colorspace and encoding.
- An easy starting point is to specify that the destination colorspace/encoding are always well-known defaults. This lets us add optional dictionary options later on that allow changing the defaults - but this would require feature detection, so it's best if we add a member earlier, even if it has only one legal value and it's the default.
- It's important to get the encoding conversions right - that is, srgb vs non-srgb. We allow both srgb and non-srgb formats as copy destinations, and we need to make sure applications can achieve the managed-image-upload semantics they need. (Note they can also get exact behavior by uploading using writeTexture instead, which involves no color management.)
See also #1482 about high-bit-depth sources.
See https://github.com/WICG/canvas-color-space about output colorspace/encoding.
Metadata
Metadata
Assignees
Labels
copyeditingPure editorial stuff (copyediting, *.bs file syntax, etc.)Pure editorial stuff (copyediting, *.bs file syntax, etc.)enhancement