- Home /
Mix 4 cameras on screen like chain sequence
I have 4 cameras in my scene. The simplest way to mix them on the screen is represented below:
1 means pixel from the first camera
2 means pixel from the second camera and etc.
For example, every camera have aspect 4:3 and draw on 4 pixels on width and 3 pixels on height. So the result resolution is 8x6 pixels.
11112222
11112222
11112222
33334444
33334444
33334444
I know how to do this using Normalized View Port Rect from docs: http://docs.unity3d.com/Documentation/Components/class-Camera.html
But I have more complicated problem. I have to mix pictures from all cameras in way like this:
12341234
12341234
12341234
12341234
12341234
12341234
The result resolution is also 8x6 pixels. But there is another pixels order.
The 1-st pixel in the 1-st line is from first camera.
The 2-nd pixel in the 1-st line is from second camera.
The 3-d pixel in the 1-st line is from fouth camera.
Etc.
I can answer the question why I need so strange pixels order. I have to transmit a picture from our application to special device (that represents like display for graphics accelerator), this device is being developed by our partners, so I can't change it.
The best way could be if I'll do it on GPU, using shaders.
How can I do this ?
Your answer