Graphics.CopyTexture to Texture2DArray no longer working

I’m using Graphics.CopyTexture to load a Texture2D into a Texture2DArray.

Both the texture and textureArray are DXT5 format.

This gist shows it working fine in 2017.2.

In 2018.3 two errors are thrown. “Invalid texture format: 12” and “Image invalid format!”.

Anyone have any ideas?

Getting these errors with DXT1 and BC5:
Invalid texture format: 10
Invalid texture format: 27

It will be very annoying if this bug ends up in the final release.

poking some devs…

5 Likes

Great news, thanks

I’m also keen to see this fixed.

Any word on this? I get at least one bug report a day about it because my assets use texture arrays…

@Tim-C Could you poke some more for us? :slight_smile:

Doesn’t look like it’s fixed in Beta10 either.

Issue now seems to have been fixed. I presume we’ll be good to go from 2018.3b11.

issue tracker says “Fixed in Unity 2019.1” though…

@rz_0lento A bit confusing but I’m pretty sure it should still make its way back to 2018.3. I think Unity just writes down the first version to include the fix.

it’s possible sure, I just wouldn’t take it granted until any official note on it :slight_smile:

but we’ll see soon enough…

We’re working on getting this fix to 2018.3.

5 Likes

Was in the b12 release notes as fixed, still broken…

Graphics.CopyTexture with a region will not copy readable texture data for compressed formats (source texture format 12)
UnityEngine.Graphics:CopyTexture(Texture, Int32, Int32, Texture, Int32, Int32)
JBooth.MicroSplat.MicroSplatUtilities:smile:rawTextureSelector(Int32, Texture2DArray, Boolean) (at Assets/MicroSplat/Core/Scripts/Editor/MicroSplatUtilities.cs:190)
MicroSplatShaderGUI:OnGUI(MaterialEditor, MaterialProperty[ ]) (at Assets/MicroSplat/Core/Scripts/Editor/MicroSplatShaderGUI.cs:184)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Yes, there was more than one issue. The complete fix will be in the next release.
https://issuetracker.unity3d.com/issues/graphics-dot-copytexture-not-working-for-compressed-textures-anymore