- Home /
is it possible to use JPG compression on iOS export for non PVRTC textures?
I know it's currently not possible to runtime compress textures to PVRTC (probably using a library it is possible, but I imagine it would be too slow). but what annoys me a bit is that the textures which are used in 16 or 24 bit uncompressed form are also put in uncompressed form into the package. This bloats filesize. If only filesize is a concern and not runtime memory consumption, It would be very convenient (and feasible) to compress textures using JPG compression and then load them as 16 or 24bit uncompressed textures into videomemory.
Is there a workarround to achieve this?
//edit: my question is all about reducing buildsize!! it's not about using JPG compression in hardware memory and it's not about performance.
But compressing to JPG makes so many artifacts you may as well just keep them compressed. You'll never get back to 'uncompressed' quality.
I'm not sure if this is quite what the original poster meant, but for a GPU to process a texture, in memory it has to either be in an uncompressed format OR in one of a limited number of texture compression formats supported by the hardware, i.e., PVRTC for iOS.
To my knowledge, no GPU will natively read compressed JPEG (nor PNG or GIF for that matter) images as a texture format, for reasons that are described on, say, page 2 of the PVRTC paper
Exactly that's what i mean - of course i'm aware that uncompressing JPG will leave artifacts. But in terms of compression quality (quality to size) JPG is much better than PVRTC for most cases. So - the idea would be to use JPG compression to reduce filesize, and at runtime use the uncompressed JPG files. $$anonymous$$y question is all about buildsize reduction, not about performance
O$$anonymous$$, understood. One other option (assu$$anonymous$$g such is possible within Unity) is to apply lossless compression on top of the PVRTC compressed data and decompress just prior to handing it to the GPU. Some re-arrangement of the data may assist here, say, de-interleaving sets of 32bits, but Y$$anonymous$$$$anonymous$$V.