- Home /
Save rendertexture to image in file
Does anyone have the code to save a render texture to an image file. I've researched it a lot but can't get it working e.g. converting it to Texture2D and then encoding to png. Thanks
Answer by Vice_Versa · Jun 01, 2015 at 04:23 PM
I think this ones been answered here
Looks like a complete answer to me. 1. Load data from RenderTexture to a Texture2D 2. Convert to PNG/JPG. 3. Write to disc.
Answer by roojerry · Jun 01, 2015 at 04:42 PM
Check the documentation and example for Texture2D.EncodeToPNG. The example does just about what you want, with only a few minor modifications
Your answer
Follow this Question
Related Questions
How to save a RenderTexture to a png from a different camera? 1 Answer
How to render a camera image to png 1 Answer
16 bits Depth Map to file using a RenderTexture 0 Answers
Saving a Texture2D as a PNG 3 Answers
Rendertexture to texture2d in Unity5 0 Answers