How could I optimized this shader / VFX

Hello I am trying to make a shader which enable my particle to share the same outline.
I finally success in but It isn’t optimized could you help me ?Here is the shader

How does it work :
https://youtu.be/cjSz02PpnlE
https://youtu.be/spU88LicGBk

I am using 3 camera , the main camera and 2 others to get 2 render texture which I use in the shader.
It’s a post process shader .

Thanks you

1 Like

camfor the first render texture

cam for the second render texture (the mask )

same outline of what, share the same outline as other objects or just have the particles themselves have the same outline?

share the same outline than particule in the system particule system

here you go, particle outline. You can fix better settings or play around with it, its just a basic function im using

i dont know how it would work with your texture but i think you can figure it out from here

bear in mind that this is an outdated or so to say function im using, im not aware of any better solution myself. Or rather havent felt the need to find one, most outlining i do is texture work.

2 Likes

Thanks you I’ll try =) .

I am currently in vacation ( I don’t have access to my project ) I’ll try when I come back , and tell you if it works with my case.

Hey , which type of shader is this ? a post process one ?