21 rt = GetComponent<Camera>().targetTexture as RenderTexture;
22 textOut =
new Texture2D (rt.width, rt.height);
23 GetComponent<Camera> ().enabled =
true;
24 GetComponent<Camera>().Render();
32 void OnPostRender () {
33 textOut.ReadPixels (
new Rect (0, 0, rt.width, rt.height), 0, 0);
36 GetComponent<Camera> ().enabled =
false;