2

Coming from a Windows background, the only compressed file format I'm used to is DDS, which uses S3 DXT compression.

I'm unsure if DDS is supported on iOS devices, and what other options there might be? I've heard of things like Ericsson Texture Compression (ETC) and PVRTC but I don't understand how they all fit together and how much they rely on specific hardware functionality.

Mr. Boy
  • 60,845
  • 93
  • 320
  • 589

2 Answers2

5

All iOS devices support PVRTC. Unfortunately it produces noticable artifacts when compressing sprite-type graphics and is restriced to power of two square textures. The new PVRTC2 format produces much better quality and removes the size restrictions. Unfortunately, Apple decided to disable this feature even though their hardware supports it. The other alternative is ASTC, which has similar quality as PVRTC2, but this is only available to the newer A8 devices using OpenGL ES 3.0.

user3259383
  • 149
  • 1
  • 9
  • Regarding artefacts with sprites: _Sometimes_ this can be due to there being vastly different colours in the fully transparent pixels adjacent to opaque data. It can be worthwhile taking a peek at what's hidden there. Also, PVRTC probably prefers non-premultiplied alpha to pre-multiplied formats. – Simon F Jun 17 '15 at 11:05
  • Good point. There is a feature in the PVR texture tool which bleeds the colours into the transparent areas. This causes less artifacts for PVRTC textures, but still the quality is no where as good as PVRTC2. I don't know about premultiplied alpha. I don't use it anyway. – user3259383 Jun 18 '15 at 19:25
  • By the way iOS also supports ETC2 for OpenGL ES 3.0, but they recommend not to use it without saying why :-o – user3259383 Jun 18 '15 at 21:46
  • I can only speculate as to why for ETC2, but one thought was it might be that, AFAIK, while RGB textures are 4bpp, RGBA textures require 8bpp. – Simon F Jul 03 '15 at 09:50
1

Strictly speaking, Windows has both the original S3TC-derived compression formats (IIRC BC1 through BC5) and the additional, more sophisticated, BC6 & 7 (which I think may have come via AMD). They are generally 4bpp or 8bpp, but if you want anything other than 2-level alpha, you need to use an 8bpp mode.

On iOS the main compressed texture format is probably PVRTC which can be either in 4bpp or 2bpp modes. These can both do transparency, but squeezing images into 2bpp mode is challenging though YMMV - certainly some well known, big developers do use 2bpp.

As with most systems, it relies on the hardware to do the decompression. I believe ETC might be mandatory with OpenGL ES3, so it may also be exposed on IOS.

Simon F
  • 1,036
  • 8
  • 23