UnityPy icon indicating copy to clipboard operation
UnityPy copied to clipboard

TextureFormat.ASTC_RGB_8x8 quality is slightly reduced.

Open Thura122016 opened this issue 2 years ago • 1 comments

Bug When I edit TextureFormat.ASTC_RGB_8x8, It changes the TextureFormat.ETC2_RGBA8 and the image quality is slightly reduced. Can you fix it or How can I?

Thura122016 avatar Jun 20 '23 21:06 Thura122016

All texture compression algorithms employed by Unity are lossy. When replacing a texture, it either has to be stored as uncompressed type or has to be compressed again. Uncompressed increases the size of the asset by a lot (2~8x of the original image data size), while recompression creates a loss in quality.

You can set an uncompressed target texture type by using Texture2D.set_image. You can achieve no compression by using TextureFormat.RGBA32.

K0lb3 avatar Jul 18 '23 12:07 K0lb3