I have a camera set up to blit a texture to the screen. The camera is set to Don't Clear and has nothing in the Culling Mask. The blit is done with a basic unlit shader with ZWrite Off and ZTest Always. The texture to be blitted is mainly completely transparent.
There are 2 problems.
Firstly, if I set the Viewport Rect on the camera to 0,0,1,1 It draws black across the whole screen. No idea why. To solve this I set it to 0, 0, 0.9999, 0.9999. For some reason this works but...
Secondly, the blit works fine but the camera clears the depth buffer. Another camera has already drawn the ground and I need to draw the foreground but anything that lies behind the ground is drawn on top of it.
Anyone have any idea why the thing with the Viewport Rect is happenening?
But more importantly, how do I stop the dummy camera from clearing the depth buffer?
Any help appreciated.