- Home /
Rendering to a portion of screen without cutting off anything that was visible during fullscreen
I want to render a camera's rendering only to a part of game screen for which I change some numbers on that camera's viewport. But, because of this I don't see everything that I was able to see when it was full-screen(i.e. without changing anything in camera's viewport). In the attachments below I see whole cube when rendered on full-screen but when I change the viewport to render on top left part of screen, part of the cube is not visible.
Is their a way I can render only to a portion of screen without cutting off anything that was visible during full screen ?
[1]: /storage/temp/125163-viewport-updated.png
But what exactly do you want to achieve? You are changing aspect ratio which means that you will either have to distort the image (shrink it horizontally) or render a bit more vertically.
Answer by ArseneySorokin · Sep 27, 2018 at 11:14 AM
Try rendering the camera into a Render texture and then setting up a UICanvas with a Raw Image in it. Place the Raw Image to cover the exact portion of the screen you want and put your Render Texture there.
Your answer
Follow this Question
Related Questions
Using multiple cameras (split screen) with LWRP? 0 Answers
How to vertically stretch camera view 2 Answers
Clamp camera to multiple on-screen players 0 Answers
Second Camera Position on Viewport to UI Element Position on Screen 2 Answers
Unity - blur on one camera effects the other as well 0 Answers