Search Unity

Post Processing Stack with several cameras

Discussion in 'Image Effects' started by Gulliver, Jan 13, 2020.

  1. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    101
    Hello everybody. I need to use PPS with two cameras in the scene. One camera with post-processing effects, other -- without them. So I created a new project from the "3D With Extras" template and have a perfect scene for experiments.

    Do following:
    1. Create new Layer "Test"
    2. Duplicate the workbench, move slightly and assing layer Test to it.
    3. Remove layer Test from Main Camera culling mask.
    4. Create a child Camera for the Main Camera with the same position and direction.
    5. Set child camera culling mask to Test layer only, Clear Flags to 'Depth Only', Depth to '1'
      Now things must run this way: Main Camera renders the whole scene except workbench clone with post-processing applied, then child camera renders workbench clone without post-processing.
      But we see only workbench clone on the black background.
      If we'll disable child camera -- whole scene (without workbench clone) with post effects appears.
      If we'll disable PostProcessLayer on the Main Camera and enable child camera -- whole scene (with both workbenches) without post effects appears.
      In other words -- child camera in some way makes post-processing produce a solid black screen.

    6. How to fix it? Thanks.