I am trying to recreate a basic object highlighting that many games are using. When you mouse over an object you will see a colored outline around the object.
Here is how I would do it:
Create a second material for the silhouette effect, with a material parameter. The second material is blended over my standard material. When I mouse over an object I just set the second material parameter to 1.
I think I would create the second material like this:
Render the object without any light information, then I get the silhouette for my object, but it is completely filled which I don’t want.
Now I would probably scale this silhouette and subtract it with my original silhouette. I think I would have to do this in a post process shader.
I don’t have much shader experience and I haven’t created any complex materials in UE4 yet. Am I on the right track? How would you create this effect?