mirror of
https://github.com/aimrebirth/tools.git
synced 2026-04-14 17:33:25 +00:00
Misc.
This commit is contained in:
parent
53b835d187
commit
e00603b511
2 changed files with 8 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -18,3 +18,5 @@ doc
|
|||
*.ind
|
||||
*.tab
|
||||
*.json
|
||||
|
||||
*.bmp
|
||||
|
|
@ -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++)
|
||||
|
|
|
|||
Loading…
Reference in a new issue