- Home /
Question by
omniyo · Dec 06, 2011 at 01:22 PM ·
texturetexture2drendererrendertexturerenderwithshader
Get RenderTexture
Hello,
I need to obtain the resultant texture from a RenderTexture each frame in order to use it in this function: material.SetTexture("tex_scene", renderTexture);
I've read about the function: Texture2D.ReadPixels
but it read the pixels from screen where i have made some geometry corrections. So i just need the real renderTexture.
Thanks in advance
Comment
Answer by Reavenk · Dec 06, 2011 at 04:58 PM
If you have UnityPro: render to RenderTexture, blit to Texture2D, then read pixels from that Texture2D. http://unity3d.com/support/documentation/ScriptReference/Graphics.Blit.html