-
Notifications
You must be signed in to change notification settings - Fork 100
Description
three.js recently ran into this issue
The symptom was that Chrome and Safari rendered differently. That appears to be a bug in Safari. But, tracking it down they were using this png file
It has both a gAMA chunk and a cHRM chunk. In WebGL it appears possible to load this file ignoring those chunks. In WebGPU, even using createImageBitmap(..., { colorSpaceConversion: 'none'}) one of the chunks is always applied.
If that's intentional then I guess there is nothing to do, though it means some files that can be loaded in WebGL can not be loaded into WebGPU unless you include you own image decoder.
If it's not intentional we probably need some tests.
The Safari issue also could maybe use a test here as well. It turned out, calling device.queue.copyExternalImageToTexture inside an image's addEventListener(load, ...) event produced different results than outside. It also was affected by internal caches. If you load the image once and use it outside of the callback event (like await for image.decode()), then if you later use it via addEventListener you get a different result.
