Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Custom Postprocessing Effect

Discussion in 'Image Effects' started by Voronoi, Apr 22, 2019.

  1. Voronoi


    Jul 2, 2012
    Now that both Postprocessing and the LWRP are out of preview, I'd like to find a way to recreate an effect I was able to do using the builtin renderer. Namely, setting the camera to 'Don't Clear' and a simple particle system I was able to create this:

    I really like the aesthetic, and would like to use the new VFX graph but they have removed stacked cameras and the Don't clear option for cameras. I have read the Writing Custom Effects tutorial and it was quite easy to get a BW effect using a C# script and the shader provided. However, I am not good at shader writing at all, and I am not sure tool-wise how to approach what I think needs to happen to recreate this effect. A shader and shadergraph? Simply inserting a semi-transparent texture during Render() or another pass?

    Can anyone help guide me in the right direction for creating a post effect that leaves a ghost trail like what I have working above? I would like it to be compatible with both the HDRP and LWRP, and it seems as if post processing effects would make this possible.

    Conceptually, I know what needs to happen:
    • Capture the last screen render (Blit is what I think I need)
    • Set the alpha of the current screen capture to something less than opaque
    • Render the current screen on top of the last screen (alpha or stencil seems like it would be useful)
    Since each screen will include an semi-transparent pass of the last screen, it should create a ghost trail effect like the old Don't clear could do. For the above image, I placed a semitransparent quad in the view, which is how the effect seems to fade out.

    I'd really like this to be as performant as possible, so that I can increase the particles and use real-time input like a camera feed to generate particles. So, I'm looking for advice on the most performant way to proceed.

    Is this something that should be processed by a shader? Or, can a Blit function that copies the last screen work as well? Any help would be appreciated, I honestly don't know where to begin!
    Last edited: Apr 22, 2019
  2. WalkerStudio


    Feb 27, 2014
    is a image effects of particle system?
  3. cyuxi


    Apr 21, 2014
    The result of such process is just fantastic !! Looks like watercolor or sumi ink.... It is a shame that no support from Unity at all....... I am as well looking for a decent way to learn how to customize the PPS...