Moments icon indicating copy to clipboard operation
Moments copied to clipboard

Recording just part of the screen

Open yosun opened this issue 7 years ago • 3 comments

It seems that, due to the usage of RenderTexture.active and having the resultant ReadPixel be "blit'd" from that, it's not possible to record just part of the screen?

I've tried using multiple cameras and changing the pixelRect to be cropped to the right part of the screen.. Is using RenderTexture necessary or is there a work around to this?

Changing the y coordinate of the ReadPixel after the RenderTexture.active source - instead of read pixel from that y coordinate, here is an example of what I mean - https://gyazo.com/5393dd53594368d117370377466cf102

yosun avatar Jun 19 '17 10:06 yosun

You'll need to modify the source code for that, by default Moments captures the whole camera view. The easiest way would be to do the cropping right after it captured the screen.

Chman avatar Jun 19 '17 17:06 Chman

it looks like Unity is not able to crop a RenderTexture, so the next best thing is changing the camera pixelRect. I'm not sure where the rendertexture is being rasterized (?)

yosun avatar Jun 20 '17 03:06 yosun

pokes

yosun avatar Dec 23 '17 09:12 yosun