2D transformation of screen segments

I’d like to be able to…

  1. Segment the screen into 6 subsegments (3x2 grid)

  2. Apply independent 2D transformations to each subsegment (rotate, translate, and scale)

  3. Render the resulting image to the screen

I’m guessing the most efficient way to do this is to use a script attached to the camera and write an appropriate OnRenderImage() implementation; however, I’m not clear how to efficiently do the 2D transformations. Does this require calling Graphics.Blit() with a material that has a shader that does these 2D transformations?

I would say 6 quads with appropriate UV mapping, along with a rendertexture.

–Eric

To be clear, I think you are suggesting using 6 cameras each rendering to a different render texture placed each on a different quad and then a 7th camera that views the 6 quads. Correct?

I guess I was hoping for something much more efficient. I was thinking a single camera with a custom post effect would work but I’m really not clear how to do the 2D transformations in the shader used by the material referenced by Graphics.Blit().

No, one camera. There’s no reason to use 6 cameras when you would just have 6 quads with appropriate UV mapping and a single rendertexture.

–Eric

I see. So, one camera to render to a texture, 6 quads with different transformations and uv offsets, and 1 camera viewing the 6 quads.

Exactly.

–Eric