How do i make a post processing effect gradient transition in the edges?


I have this post processing material where my character becomes green if it is behind a mesh. Thats cool.
Though i need something like a gradient / pixelated transition towards the character. So something like this (done in photoshop):

You see the little pixels spraying over the character. How can this be done? What terms do i search for?

It seems this would need something like a mask. Though how do i place that in a PostProcessing material if there is no Opacity mask