- Home /
Alternative for Graphics.CopyTexture() ?
Hello, I have a small project where I have to read out a RenderTexture and put the Information into a Texture2D. So far I have only found two options. GetPixels: works on all platforms, but is far too slow. Graphics.CopyTexture(): very good performance. However, according to the documentation, this feature does not work on iOS. Is there an alternative for Graphics.CopyTexture for iOS? Or does someone knows any other way to read RenderTextures?
Answer by thegreengree · Feb 17, 2021 at 05:59 PM
I guess there is no other way to do it.
If you want to do it fast on GPU, use Graphics.CopyTexture(). You can check support of that with SystemInfo.copyTextureSupport.
If target hardware doesn't support it, you fall back to Texture2D.ReadPixels() and need to account for slow copy.