mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 20:18:07 -05:00
textures: add BC1 and BC3 compressors and recompression setting
This commit is contained in:
36
externals/stb/stb_dxt.h
vendored
Normal file
36
externals/stb/stb_dxt.h
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
// SPDX-FileCopyrightText: fabian "ryg" giesen
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
// stb_dxt.h - v1.12 - DXT1/DXT5 compressor
|
||||
|
||||
#ifndef STB_INCLUDE_STB_DXT_H
|
||||
#define STB_INCLUDE_STB_DXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef STB_DXT_STATIC
|
||||
#define STBDDEF static
|
||||
#else
|
||||
#define STBDDEF extern
|
||||
#endif
|
||||
|
||||
// compression mode (bitflags)
|
||||
#define STB_DXT_NORMAL 0
|
||||
#define STB_DXT_DITHER 1 // use dithering. was always dubious, now deprecated. does nothing!
|
||||
#define STB_DXT_HIGHQUAL \
|
||||
2 // high quality mode, does two refinement steps instead of 1. ~30-40% slower.
|
||||
|
||||
STBDDEF void stb_compress_bc1_block(unsigned char* dest,
|
||||
const unsigned char* src_rgba_four_bytes_per_pixel, int alpha,
|
||||
int mode);
|
||||
|
||||
STBDDEF void stb_compress_bc3_block(unsigned char* dest, const unsigned char* src, int mode);
|
||||
|
||||
#define STB_COMPRESS_DXT_BLOCK
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // STB_INCLUDE_STB_DXT_H
|
Reference in New Issue
Block a user