Realtime Texture Compression for Android [RELEASED]

It is a realtime texture compressor(ETC1) for Android.

I made it for compressing WWW.textrue in Android platform.

Thanks.

Example code:

CompressTexture compressor = new CompressTexture(texture);
yield return StartCoroutine(compressor);
if (compressor.compressedTexture != null)
{
	// ...
}
CompressTexture compressor = new CompressTexture(texture);
StartCoroutine(compressor);
// Do something else.
while (!compressor.isDone)
    yield return null;
if (compressor.compressedTexture != null)
{
    // ...
}

Doxygen docs:

http://dl.dropbox.com/u/42560088/texcmp/html/index.html

Asset store link:

http://u3d.as/content/m-kim/realtime-texture-compression-for-android-etc1-/4pF

https://www.assetstore.unity3d.com/#/content/7724

Demo:

Android sample APK

only android, not ios?

There is a patent issue about PVRTC compression algorithm. I heard.

Looks like there is memory leak, some solutions?

It need GameObject.Destory(texture) after using it and WWW too. Or more informations?

Is it possible to convert to ETC2? Any ideas?

Im also interested in this. ETC1 doesn’t support alpha.

It seems to work only on Unity 4.
Tested on unity 4.7, unity 5.6.5 and unity 2018. Works on unity 4.7, on unity 5.6.5 and unity 2018 the compressed texture format is forced to ETC2_RGB for some unknown reason even if the code explicitly create a Texture2D in ETC_RGB4 format. This cause the compressed texture to come out corrupted (like a set of white lines).