I am wondering what the expected behaviour for OnRenderImage is if I do not set the destination RenderTexture? I am trying to render multiple cameras to the screen with a mask, but even when I do not modify the destination RenderTexture the objects are still written to screen? Is it expected behaviour to still the camera render if you have a script like this attached to a camera?
public void OnRenderImage(RenderTexture source, RenderTexture dest)
{
return;
}
I’m guessing you are using a still image to test this? What seems to happen is that the image gets rendered once to the destination render texture. Each subsequent frame, the destination contains whatever was last rendered to it. If you don’t explicitly clear the destination, it will continue with that first frame permanently visible. As far as I can tell, this only happens with the editor, not the build. However, if it turns out to be a problem, you could do something like this:-
var cleared: boolean;
function OnRenderImage(source: Texture, dest: RenderTexture) {
if (!cleared) {
Graphics.Blit(null, dest);
cleared = false;
}
}
Not very elegant, I know 
Thanks for the reply andeeee, that is clearing the screen. Do you know if it is possible to blit with a texture with alpha values (as the source texture) to get the information that other texutres are writing to screen?
I tried bliting with a transparent texture but it does not appear to be accepting the alpha values of the texture (there are two cameras in the scene and I would like to keep the original screen draws before the second camera is rendered.