diff --git a/.gitignore b/.gitignore index 89320d5..b471a7b 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,6 @@ doc *.dat *.ind *.tab -*.json \ No newline at end of file +*.json + +*.bmp \ No newline at end of file diff --git a/src/common/dxt5.h b/src/common/dxt5.h index c4b77fe..9e43183 100644 --- a/src/common/dxt5.h +++ b/src/common/dxt5.h @@ -24,6 +24,10 @@ #include "color.h" #include "mat.h" +// https://en.wikipedia.org/wiki/S3_Texture_Compression +// decompressor https://github.com/Benjamin-Dobell/s3tc-dxt-decompression +// compressor https://github.com/nothings/stb/blob/master/stb_dxt.h +// or modified https://github.com/Cyan4973/RygsDXTc/blob/master/stb_dxt.h struct dxt5_block { union @@ -99,7 +103,7 @@ struct dxt5_block pixels[p].a = a[(alpha_part >> (16 + p * 3)) & 0b111]; } } - color interpolate(color c0, color c1, float m) + static color interpolate(color c0, color c1, float m) { color r; for (int i = 0; i < 4; i++)