TimvanScherpenzeel / texture-compressor

CLI tool for texture compression using ASTC, ETC, PVRTC and S3TC in a KTX container.
MIT License
200 stars 40 forks source link

S3TC - Default texture encoding #20

Closed glegenty closed 6 years ago

glegenty commented 6 years ago

Hi ! What is the default encoding output for S3TC file, is it RGB ?

TimvanScherpenzeel commented 6 years ago

https://github.com/TimvanScherpenzeel/texture-compressor/blob/994afe2ecac0c31e37c7cf98952e4db79891cfba/lib/compressWithS3TC.js#L48

By default it is RGB correct. You will have to pass an -a or --alpha flag to use RGBA.

From what it looks like DXT5 and DXT3 do not respond to the alpha flag, I'm planning to fix that soon.

Most of the info regarding the file formats can be found in the documentation

TimvanScherpenzeel commented 6 years ago

I've just tried to add DXT5A mode but that did not result in the expected result so I'll avoid from adding it. From what I understand from the documentation DXT5 includes an alpha channel so I'm not so sure what DXT5A does specifically (perhaps a separate alpha channel only).