I’ve seen a couple threads with similar questions, but I haven’t been able to figure out the solutions they’ve presented.
I’ve been struggling to recreate a shader similar to the one used by the foliage painting tool, as seen here
…and present in The Division, shown here by the grenade highlight (orange highlights).
I am interested in the portion which highlights intersecting geometry.
I can create the core of the effect by rendering three spheres:
Two spheres with their front-faces culled and a third with backface culling. Then I do some depth testing with stencils to highlight all the intersecting geometry.
The problem I run into is how to accomplish the gradient fade (center is slightly less opaque, and opacity increases as it gets to the edge).
Is there a way I can view the source for Unreal’s shader, or has someone perhaps done this already?
It just feels like I could be doing this a different way which would allow for what I want.