←back to thread

148 points ibobev | 4 comments | | HN request time: 0.76s | source
Show context
jms55 ◴[] No.45153852[source]
I've been evaluating texture compression options for including in Bevy https://bevy.org, and there's just, not really any good options?

Requirements:

* Generate mipmaps

* Convert to BC and ASTC

* Convert to ktx2 with zstd super-compression

* Handle color, normal maps, alpha masks, HDR textures, etc

* Open source

* (Nice to have) runs on the GPU to be fast

I unfortunately haven't found any option that cover all of these points. Some tools only write DDS, or don't handle ASTC, or want to use basis universal, or don't generate mipmaps, etc.

replies(3): >>45155772 #>>45156546 #>>45159682 #
1. raincole ◴[] No.45155772[source]
What did bevy end up using?
replies(1): >>45155838 #
2. jms55 ◴[] No.45155838[source]
Nothing, I haven't found a good option yet.

We do have the existing bindings to a 2-year old version of basis universal, but I've been looking to replace it.

replies(2): >>45156877 #>>45157523 #
3. pornel ◴[] No.45156877[source]
I don't think you'll find anything much better than basis universal, assuming you want textures compressed on the GPU and the simplicity of shipping one file that decodes quickly enough. I've followed development of the encoder, and its authors know what they're doing.

You might beat basisu if you encode for one texture format at a time, and use perceptual RDO for albedo textures.

Another alternative would be to use JPEG XL for distribution and transcode to GPU texture formats on install, but you'd have to ship a decent GPU texture compressor (fast ones leave quality on the table, and it's really hard to make a good one that isn't exponentially slower).

4. raincole ◴[] No.45157523[source]
Is basis universal that bad? I thought it's more or less invented for this purpose.