2D sprite effects - glowing border


I’m struggling to implement a glowing border around an actor/sprite upon a click event. The click is working fine,and I have managed to make the entire sprite glow by using a custom material but I need to be able to see the unaltered sprite with a glowing outline.

Any thoughts on the best way to achieve this.



There are tutorials for such material for 3d objects.
This one is nice:

However i tried to make such material for 2d objects and i could not find node that would do it.

Thanks for the reply,

Yes, I’ve seen several ideas on how to do this in 3D, and I have implemented similar myself fine in 3D but doing it in 2D is proving to be somewhat difficult.

Been there, and i never could find node that would do the trick in 2d.

you did ?Did you manage to make the glow to sprites?

Shader would be simple if you can check pixel color (or alpha) of sprite 2d material.
This is GLSL shader code: OpenGL ES Shader to outline 2D images - Stack Overflow

Back then i was looking for node that can read if pixel is sprite or 3d viewport.
But you can just read alpha of 2d sprite material and apply glow or not. That would be like 2d shader applied to edges of material. Not 3d shader as postprocess.
I know sometimes you need postprocess when you want glow globally not applied to every material in sprites.