I've built an application in the free version of Unity which allows several instances to connect to a server over a LAN. Each client sees the scene through the server's camera. From here, the server modifies values of the clients' projection matrices so that the client windows can be positioned around each other to draw one whole merged image from all the windows. Eventually this will be used with several projectors to get a high-res scene.
Upon activating my Unity Pro trial and activating shadows, I have found that the clients with modified projection matrices have either flickering shadows (soft and hard), or have weird dark/light distortions around where shadows should and shouldn't be.
There are 2 methods of modifying the matrix which I am using:
The sliding method causes shadow flickering, with shadows flickering more and more as the visible portion moves further along the X axis (in camera space).
The rotation method causes the shadows to completely fudge up, and it's kinda hard to explain. They are never where they should be, unlike the sliding method where they just flicker in the correct place. The shadows move, disappear and distort as the camera moves around. Even rotating by 1 degree is enough to make a horrible dark stripe appear over part of the image. When no rotation is applied, the shadows are correct.
I was wondering if the shadows are computed using values in the camera's projection matrix? I know shadows have a lot to do with projection, but I thought only the light direction would come into it, not the camera projection?
I'm using deferred lighting as I want other types of lights to cast shadows too.
Does anybody have any ideas?