- Home /
Question by
Patrick Kenzie · Nov 07, 2013 at 04:14 PM ·
androidrendertexture
RenderTextures are black on Galaxy Nexus
I'm trying to save a RenderTexture as a Texture2D for saving/reuse, using this technique from the documentation:
RenderTexture currentRT = RenderTexture.active;
RenderTexture.active = cam.targetTexture;
cam.Render();
Texture2D image = new Texture2D(cam.targetTexture.width, cam.targetTexture.height);
image.ReadPixels(new Rect(0, 0, cam.targetTexture.width, cam.targetTexture.height), 0, 0);
RenderTexture.active = currentRT;
return image;
In the editor and on a Nexus 7 tablet (Android 4.2.2, the code works fine, but on a Samsung Galaxy Nexus phone (Android 4.3) the textures are always black. Is there some kind of texture format setting I'm missing that would result in the textures not appearing?
Comment