Search Unity

Get my Image Effect to run after Post process

Discussion in 'Image Effects' started by SpookyCat, Jan 20, 2020.

  1. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,767
    Is there a way to get my custom Image Effect which uses OnRenderImage to happen after the Post Process stack has been rendered, I have tried changing the Script Execution order but it has no effect, is there some trick to allow this to work.

    Also is it possible to save the depth buffer from one camera and use it as a texture in an image effect shader on another camera?
     
    Last edited: Jan 20, 2020
  2. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    I have done this previously, you need to render it into a new RT with a custom depth-copy shader and pass that RT to the other camera. That is the only platform-agnostic method that will actually work reliably. Just be careful about what type of RT you use, as obviously depth is typically very high precision.