- Home /
How to disable texture wrapping caused by compression?
When I choose Automatic compression (i.e. RGB compressed PVRTC 4bit on iOS) then I can see artifacts in my texture - it is being wrapped, even when texture wrapping mode is set to Clamp.
Source:
Result (you can see brown line on the left even and it shouldn't be there). The screenshot is taken from inspector preview.
When I disable compression the artifacts disappear, but of course I want to have the compression. Is there a way to disable that wrapping and keep good compression?
Answer by Paulius-Liekis · Aug 11, 2014 at 01:03 PM
Generally speaking it is not possible to control that.
First, it is possible to set compression Quality to best. That reduces amount of artefacts.
Second option is add extra line of pixels on each side, although that's PITA...
Answer by Xtro · Jul 24, 2014 at 03:48 PM
PNG file format is a compressed format like GIF and JPG. As you may know, JPG is a lossy compression. GIF is lossless but it's old. PNG is the new GIF. Supports many features and compressed lossless.
If you choose to compress in unity import settings, actually you are converting it to JPG like format which is lossy. You can keep this import setting as Truecolor and it still will be compressed because your file format is PNG. (I'm not 100% sure if unity keeps the PNG format if we choose "truecolor" but if it does, it's compressed)
I understand compression-artifacts are result of compression. On the other hand JPG does compression but it doesn't create wrapping artifacts. So my question is which iOS compression format has same quality of compression, but doesn't wrap texture during this process.
When you choose Truecolor it does no compression at all (it doesn't matter what was format of your source file). Also there is big difference between compression sizes, for example PVRTC is 40kb, 16bit compression is 170kb.
Truecolor doesn't compress on memory but on disc it might. As I said before, PNG is a lossless compressed format and it stays on disc.
Still, I don't know how Unity imports PNG files into its asset library. If it keeps the PNG in the library, it's still compressed. If it converts PNG into something else, it's not compressed. I don't know what Unity does but I would love to know :)
I just confirmed from unity documentation. Truecolor is not compressed even if the file format is PNG.
Your answer
Follow this Question
Related Questions
Wrapmode clamp still has the white line. 0 Answers
Texture compression distortion. 1 Answer
Texture Compression format for UWP,Texture 0 Answers
Detect Android GPU/chipset at runtime? 1 Answer
Texture DXT5 regression in 2019.1? 0 Answers