In Photoshop, What I would usually do is,
1.Apply ‘Glowing Edges’ Filter
2.‘Select Color Range’ with White Color (The Edges)
3.Delete the Edges
4.Replace the black color in the image with White
I’m looking for something similar to do in Unity (at runtime). Is this possible?
I have used OpenCV, a native open-source image processing library. It comes with tons of built-in filters, but it is also very low-level. You extract pixels from a texture, send it over to OpenCV along with the steps you want, and off it goes.
Specifically I used it for QR-code-style image recognition, as well as some smoothing filters, but like I said, it only does the very lowest-level pixel manipulation and processing, but it is fast.
There is a Unity3D asset store package that nicely bundles up the OpenCV code and last I checked it was $100 or so, which will save you a TON of time trying to get it to build for all targets. Or you can download the source yourself and do whatever you need with it. Here’s a forum link on it:
Unless it has some reservoir of hidden functionality this doesn’t appear to serve the purpose required by the OP at all? That’s image recognition, OP needs Photoshop.
Then output Camera to a rendertexture, then using another Shader, replaced the black color in the texture with 0 alpha.
Now, the only problem I have is that the Outline shader fluctuates a lot on different objects.
I tried using Edge Detection Post Processing Effects, but URP doesn’t have support for custom post processing effects yet. (Unity used to provide an edge detection effect in the standard assets before, but they stopped that since the PP stack).
I looked into that and it seems a little bit too advanced for me. So, I’m gonna stick with Shaders for now.