Search Unity

Post Processing Stack: Effect only on objects inside volume

Discussion in 'Image Effects' started by spakment, Jun 18, 2018.

  1. spakment

    spakment

    Joined:
    Dec 19, 2017
    Posts:
    96
    Is it possible to apply colour grading effects (greyscale is what I'm wanting to apply) to objects that are inside a set of specific volumes?

    I'm not looking to apply the effect globally to the camera but to an area and objects within that area.
    Like a "volume mask".

    Searching the forums I can only find some info which suggests creating a stencil buffer and then use that as a mask for the effects. I'm wondering if there is anything in the current post processing stack which may already do this?
     
  2. spakment

    spakment

    Joined:
    Dec 19, 2017
    Posts:
    96
    I think I need to use a stencil, but I'm not sure if its possible to get just the over lapping volumes using stencils - I think I'll always get the middle case (a kind of portal view) below rather than the desired final version.
    Does anyone have any experience of this?
     
  3. spakment

    spakment

    Joined:
    Dec 19, 2017
    Posts:
    96
    As far as I can tell this isn't possible just by using stencils. I think some combination of cull Back and cull Forward with
    ZTest Greater may get me the effect I'm looking for.