npedotnet / DDSReader

DDS image reader for Java and C.
MIT License
14 stars 4 forks source link

This project is totally missing the point of Texture Compression #1

Open magicgoose opened 8 years ago

magicgoose commented 8 years ago

Texture Compression isn't used in the same way like JPEG, PNG, etc. Texture formats like S3TC (which is used in DDS files) are supposed to be directly loaded to GPU and they are then never fully decompressed, instead they are decompressed on the fly, that's how GPU saves memory and bandwidth.

And the code examples in this repo decompress textures and push them to GPU after that. If you are doing this, then there's no point in using DDS at all and there are better formats for non-GPU friendly compression (for example, JPEG, WEBP)

DragShot commented 3 years ago

Very very late reply here, but I do appreciate seeing instructions in code on how to read these files. Also, while mostly useless for games, this lib could be helpful for related tools like UI or map editors, where maximum performance is not really needed but reading DDS textures is.