- Home /
Copy frame buffer into Texture
Hi guys, I would like to copy the content of the frame buffer into a texture in a FAST way, every frame.
No Texture2D.ReadPixels, it's super slow, probably because it locks the frame buffer and double buffer writes are delayed, making a mess.
I was thinking to do a Graphics.Blit in the PostRender of the camera, but then I need to call a re-size on the texture to save space when storing it. I would prefer to do both copying and re-sizing at the same time. I guess a shader is the only option. Too bad I don't even know where to start. Maybe some of you guys can direct me to a close example.
Cheers!
Answer by scorched · May 19, 2015 at 07:55 PM
Have you tried just changing Target Texture property of a Camera object to Render Texture as in link below?
http://docs.unity3d.com/Manual/class-RenderTexture.html
Though, that camera will not draw to screen, you will need extra camera for screen
Your answer

Follow this Question
Related Questions
Graphics.Blit with custom shader gives black screen under iOS 2 Answers
Save a texture after a pass in shader 0 Answers
dynamic hole in layer / texture / camera 0 Answers
Blit isn't writing to render texture 1 Answer
Multiple Blit problem 2 Answers