Search Unity

Composite camera setup with new post processing stack

Discussion in 'Image Effects' started by JohnTomorrow, Oct 19, 2017.

  1. JohnTomorrow

    JohnTomorrow

    Joined:
    Apr 19, 2013
    Posts:
    135
    I'm trying to implement the new post processing stack with a two camera setup for FPS rendering. I searched a bit and was surprised I couldn't find any threads on such a common use case.

    My camera setup is the following:
    MainCam (Depth: 0, Culling Mask: Default, Clear: Solid Color)
    FPSCam (Depth: 1, Culling Mask: Test, Clear: Depth Only)

    The issue I am facing is I can apply the post-processing to FPSCam but then I lose all depth information and certain effects fail. If I apply the post-processing to MainCam I get the depth information but then the FPS cam loses all post-processing. What are some good ways to work around this? I tried using a third camera and rendering the two camera to render textures and the compositing them with Graphics.Blit but that was buggy and seemed very wrong to me.
     
  2. growlitheharpo

    growlitheharpo

    Joined:
    Sep 6, 2015
    Posts:
    2
    Bumping this to see if anyone has a solution. I'm in the exact same boat of compositing two cameras together. I'm using V2 of the post processing stack and that didn't help.
     
  3. JohnTomorrow

    JohnTomorrow

    Joined:
    Apr 19, 2013
    Posts:
    135
    I ended up having to apply postprocessing twice. All depth related fx on the main cam and all others on the fps cam. This isn't ideal of course as you aren't able to use all the fx like temporal anti aliasing.
     
  4. growlitheharpo

    growlitheharpo

    Joined:
    Sep 6, 2015
    Posts:
    2
    Don't know why I didn't think of that! This'll definitely work for now, thanks for the help. Hopefully an update to the stack comes out with full compositing support somewhere down the line.