Hello, anyone makes Graphics.CopyTexture work with Compressed (DXT) textures?
From [Graphics.CopyTexture][1]
Compressed texture formats add some restrictions to the CopyTexture with a region variant.
For block-based formats (e.g. DXT, ETC), the region size and coordinates must be a multiple of
compression block size (4 pixels for DXT).
Which I quite not understand what they mean by region size and coordinates, and how I should alter the code. I am using
for(int j = 0; j < texture.mipmapCount; j++) { // Copy all mipmap levels
Graphics.CopyTexture(texture, 0, j, texture2DArray, i, j); //-i- is index into texture2DArray
}
But getting:
Invalid texture format: 25
UnityEngine.Graphics:CopyTexture(Texture, Int32, Int32, Texture, Int32, Int32)
Image invalid format!
UnityEngine.Graphics:CopyTexture(Texture, Int32, Int32, Texture, Int32, Int32)
But the result saved in texture2DArray looks OK.
Any help will be appreciated.
[1]: https://docs.unity3d.com/ScriptReference/Graphics.CopyTexture.html
↧