Multi Camera Forward Rendering Issue

I have 2 cameras:

  • The Character Camera (depth 1) renders the character into a RenderTexture which is assigned to the material on a Quad.
  • The Quad is positioned in a corner of the Game Camera (depth 2), which renders the Quad and the rest of the scene.

Everything looks fine in the scene view, when viewing the character through a regular camera, and with this setup using deferred rendering, but not with this setup using forward rendering: http://imgur.com/a/0ZgIc.

The most obvious issue is that the headband, eyes, and teeth all appear in front of the skin as if it was some transparency sorting issue. But they’re all using the standard shader in opaque mode, so I don’t see how it could be that.

The other problem is that there’s no anti-aliasing. Its on 2x and is clearly noticeable if I render just the character with a single camera, but using multiple cameras like this seems to disable AA.

Does anyone know what might be causing either of these issues?

AA doesn’t work in deferred, so there’s that. The “transparency” effect sounds like you don’t have a depth buffer for your render texture.

You need to have the depth set to something other than zero otherwise it won’t be able to sort properly. Similarly you have to set the anti-aliasing level on the render texture itself.

Yep, that was it. Thanks.