summaryrefslogtreecommitdiff
path: root/Runtime/Graphics/DXTCompression.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Graphics/DXTCompression.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/Graphics/DXTCompression.h')
-rw-r--r--Runtime/Graphics/DXTCompression.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Runtime/Graphics/DXTCompression.h b/Runtime/Graphics/DXTCompression.h
new file mode 100644
index 0000000..414c23e
--- /dev/null
+++ b/Runtime/Graphics/DXTCompression.h
@@ -0,0 +1,13 @@
+// Fast DXT compression code adapted from
+// stb_dxt by Sean Barrett: http://nothings.org/stb/stb_dxt.h
+// which is in turn adapted from code by
+// Fabian "ryg" Giesen: http://www.farbrausch.de/~fg/code/dxt/
+
+#ifndef __DXT_COMPRESSION__
+#define __DXT_COMPRESSION__
+
+// src: 32 bit/pixel width*height image, R,G,B,A bytes in pixel.
+// dest must be (width+3)/4*(height+3)/4 bytes if dxt5=true, and half of that if dxt5=false (dxt1 is used then).
+void FastCompressImage (int width, int height, const UInt8* src, UInt8* dest, bool dxt5, bool dither );
+
+#endif