Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

HDRP Post Processing multiple camera issue

Discussion in 'Graphics Experimental Previews' started by sanmn19, Dec 13, 2018.

  1. sanmn19

    sanmn19

    Joined:
    Jun 30, 2013
    Posts:
    56
    Goal: To have post processing effects affect only one camera.

    Steps done so far:
    Create 2 projects. One for HDRP and one for normal.
    In each project, do the following
    1. Make a scene with spheres meshes in the default layer and the capsule meshes in a layer named "New"
    2. Create an additional camera(Camera 2). Set its depth to 1. The default main camera(Camera 1) has depth -1.
    3. Set Camera 2 culling mask to only render "New" Layer with the capsules.
    4.
    i. Set Camera 2 'Clear mode' to None and 'Clear Depth' to true for the HDRP project.
    ii. Set Camera 2 "Clear flags" to "Depth only" for the Normal project.​
    4. Set Camera 1 culling mask to render every layer except "New" layer.
    5. Create a post processing effect with Depth of field.(Chosen randomly)
    6. Create Post processing volume and set isGlobal to true.
    7. Add Post Processing Layer to Camera 1.

    Result: From the screenshots below, you can see that Normal project applies the post processing to Camera 1 correctly where as HDRP project does not apply the post processing to Camera 1 at all.

    Screenshots: https://imgur.com/a/FowTpVP
     
    Last edited: Dec 13, 2018
  2. Jick87

    Jick87

    Joined:
    Oct 21, 2015
    Posts:
    124
    From what I've seen, they decided to not support multiple cameras in the scriptable render pipelines (for now at least)? You can see some mention of it here. Not sure what workaround (if any) there may be.
     
  3. sanmn19

    sanmn19

    Joined:
    Jun 30, 2013
    Posts:
    56
    Oh. Hopefully they will fix it soon. I used 4.6.0 HDRP package as well. In that post they have mentioned that it'll be fixed in 2019.1. Anyone from Unity can update us on this?
     
  4. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    You could also try rendering to a rendertexture on your second camera instead of directly to screen.
     
  5. equalsequals

    equalsequals

    Joined:
    Sep 27, 2010
    Posts:
    154
    The intended workflow is that you set up a custom Render Pass instead of additional Cameras with depth only clear. This allows you to bypass the incurred overhead of additional Cameras.
     
  6. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    433
    Meeting the same issue here, any guideline about how to fix this? It has been so long
     
  7. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Same here. A guide would be great.
     
  8. Hybris_Team

    Hybris_Team

    Joined:
    Oct 17, 2015
    Posts:
    114
    Has this been updated? Wondering if HDRP supports multiple cameras with clear flags and separate post processing?
     
  9. niallmc

    niallmc

    Joined:
    Sep 3, 2015
    Posts:
    44