4 ms·
I think they should siply use four patches of BC1 (DXT1) texture: https://en.wikipedia.org/wiki/S3_Texture_Compression https://en.wikipedia.org/wiki/S3_Texture_
by IvanK_net 4y ago
I think they should siply use four patches of BC1 (DXT1) texture: https://en.wikipedia.org/wiki/S3_Texture_Compression https://en.wikipedia.org/wiki/S3_Texture_Compression
It allows storing a full 8x8 pixel image in 32 Bytes (4 bits per RGB pixel).
- TheRealPomax 4y agoIf it's really that simple, looking forward to your github repo that gives folks the JS and Rust libraries to do that =)
- 8n4vidtmkvmk 4y ago> 4 bits per RGB pixel That sounds inferior. From the article: > ThumbHash: ThumbHash encodes a higher-resolution luminance channel, a lower-resolution color channel, and an optional alpha channel. You want more bits in luminance. And you probably also don't want sRGB.
- edflsafoiewq 4y agoNice idea. I tried it, it works really well: https://imgur.com/a/p3l6ABh https://imgur.com/a/p3l6ABh A software decoder would be tiny and you can use an existing good BC1 encoder.
- IvanK_net 4y agoWow, nice! I wrote a BC1 encoder in JS, it is quite simple :) https://github.com/photopea/UTEX.js/blob/master/UTEX.js#L198 https://github.com/photopea/UTEX.js/blob/master/UTEX.js#L198