w3c / webcodecs

WebCodecs is a flexible web API for encoding and decoding audio and video.
https://w3c.github.io/webcodecs/
Other
951 stars 135 forks source link

Progressive loading for textures #54

Closed munrocket closed 3 years ago

munrocket commented 4 years ago

In WebGL applications we facing with issue that downloading from server and loading texture to GPU is pretty slow operation. In web we have progressive JPEG/WEBP but we can't access to level of details and need to create 2-4 versions of a file each of which laready has progressive format.

In same WebGPU issue https://github.com/gpuweb/gpuweb/issues/766 they suggested to me Basis and your repo. But looks like basis should be smaller in size or inside js fetch API?

sandersdan commented 4 years ago

The mipmap bias is outside the scope of WebCodecs (or really any spec, it's part of the app/engine), but progressive loading in general is being considered as part of the ImageDecoder API.

That is being discussed in https://github.com/dalecurtis/image-decoder-api/issues/3.

munrocket commented 4 years ago

This could be a good improvement, feels like webgl/webgpu not so good as page render without it.

dalecurtis commented 4 years ago

Thanks for the link. It's good to know folks would be interested in this.

munrocket commented 4 years ago

This is not popular, but works like charm. I wonder why we still doesn’t have it. Texture load for 4k images takes lot of time.

chcunningham commented 3 years ago

The ImageDecoder spec is now landed with facilities for decoding progressive images from a readable stream off the network. https://w3c.github.io/webcodecs/#typedefdef-imagebuffersource

I don't think there's another clear action item for WebCodecs here. Please re-open if I've overlooked anything.