Search Unity

Post Process Effect Sequence

Discussion in 'Shaders' started by falkenbrew, Jun 27, 2020.

  1. falkenbrew

    falkenbrew

    Joined:
    Apr 21, 2020
    Posts:
    146
    'm still having quite some trouble with the effects in the volume. They do not run in the sequence I would expect. As you can see, the mirror should be applied first. Then bloom, then a ripple effect. In the screenshot you can see the ripple effect has been mirrored in both horizontal and vertical direction. What am I missing? I just updated to the newest Unity version hoping this would fix it.

    I've had it working before, but something I did must have changed the result. I know there is a place to force scripts to be executed based on priority, but how does it work with effects? The second volume was a solution that I came up with, but for some reason it no longer helps, it probably never did.

     
  2. falkenbrew

    falkenbrew

    Joined:
    Apr 21, 2020
    Posts:
    146
    This seems to be some short-coming in the PostProcessLayer code, I'm worried I might need to hack something in to get what I want.
     
  3. falkenbrew

    falkenbrew

    Joined:
    Apr 21, 2020
    Posts:
    146
    I managed to fix my issue by hacking the postprocesslayer and adding custom sorting. Nothing clever, but it works for me and it's short.
    Code (CSharp):
    1. void UpdateBundleSortList(List<SerializedBundleRef> sortedList, PostProcessEvent evt)
    2.         {
    3.             ....
    4.  
    5.             sortedList.Sort(delegate (SerializedBundleRef a, SerializedBundleRef b)
    6.             {
    7.                 return a.bundle.attribute.menuItem.CompareTo(b.bundle.attribute.menuItem);
    8.  
    9.             });
    10.         }