- Home /
Camera size and RenderTexture
So I have a little setup; a plane with all my necessary materials on it, and an orthographic camera attached. I will be using ReadPixels through this camera, but I don't exactly know how to set up the camera to match the plane so that the rendered texture will turn out perfectly. I've tried several different Rects, but I haven't found one that fits well enough. Various camera variables have also been a bit wacky.
I've made the plane 1x1, and an orthographic camera needs to be at 0.5 size. But it still shows up in widescreen. I can't seem to adjust the camera to match the plane exactly, regardless of my screen size.
Are there any references I can read about this specific problem?
Or perhaps someone might know a better way to manage this setup?
Note that if you just get "2DToolkit" from the Asset store, I believe this problem is nicely resolved for you - it's a great tool.
Answer by cjmarsh · May 19, 2011 at 06:08 AM
You could project a vector from every point on your surface ( up to the maximum supported resolution ) to an arbitrary plane representing your screen coordinates. This plane can then be crafted into a texture and displayed at the near clip plane of whatever camera type you like.
Your answer
![](https://koobas.hobune.stream/wayback/20220612080504im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Why is ReadPixels on my RenderTexture creating a pure gray texture? 1 Answer
Render Texture does not work on only IOS devices 0 Answers
ReadPixels Performance 0 Answers
Can a Texture2D be created at runtime from a snapshot of a RenderTexture? 3 Answers
Unity4 problem - Bypassing camera renderTexture with ReadPixels but system out of memory 1 Answer