Search Unity

Post Processing layer mask doesn't make sense to me

Discussion in 'Image Effects' started by dgoyette, Jun 26, 2018.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    Hopefully there's a simple answer for this, because I still don't understand this from reading the documentation.

    Here's a screenshot of my Post Process Layer:

    upload_2018-6-26_15-6-56.png

    The layer mask is set to Everything, which the component warns against. But it seems that the post processing will only affect objects on the selected layers. For example, I have some emissive objects on the "default" layer, and I'm using the Bloom effect in my post processing profile. If I don't include the Default layer, then the post processing effects won't work on those objects.

    Am I missing something here? I generally want post processing to affect every object on the screen. Am I expect to add one Post Process Layer for every layer in my game that should be affected by post processing effects?
     
  2. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    I'm also confused at first on how to use the new Post Processing Stack v2. I think they designed it this way for flexibility and optimization reasons. What if you add a Post Process Volume to your main camera and specify there a Post Processing Profile with all the effects you want to appear for every objects? IIRC, that worked for me before.

    I am actually going back to v1 because my recently acquired weather system that I plan to use still doesn't support bloom in v2. Now, I don't know how to use v1. hehe Anybody has a link where I can learn how to use it?
     
  3. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    I think that layer is in reference to the volumes that you want to be blended as it can blend different post processing volumes based on triggers. In short, put your camera and all your pp volumes on a layer called postprocessing.
     
  4. YaserDev

    YaserDev

    Joined:
    Aug 17, 2016
    Posts:
    20
    If you want to apply the post-process effect to all the objects in the scene, then just leave the layermask to Everything or Default.
    That warning is there to remind you that if there are many objects affected by the post-process, then this may slow the performance, and in that cause you can group the objects that must have the post process effect into layer(s) and change the layer mask to include those layer(s) only.
    If you don't have many objects in the scene, or if you aren't noticing any performance problems on your target hardware (PC, PS4, etc) then don't worry about it.

    Either way, it's best to have your objects assigned a layer other than the default.
    For example:
    Environment
    Player
    Enemies
    Or possibly a Post-Processing layer.

    Also, don't optimize before you see any problems, that's a general rule to follow.