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.
Hey, I’ve tried copy pasting it into the material editor in 4.19 and 4.18 as well as dragging in a saved .txt file on two separate computers and it isn’t working. Any ideas on what the problem could be? I have managed to do this before with a landscape material in a 4.16 project and it worked no problem.
Thanks a ton for this by the way I’ve been struggling with getting a similar material working with a desaturation for awhile now and this looks perfect!
I’m sure this is probably too late, but I just went through the text document by hand and came up with this graph. Tested it out and it seems like it works pretty well.
In the details panel of the material, you have to set a few options:
Material Domain: Surface
Blend Mode: Translucent
Shading Model: Unlit
Two Sided: check
Disable Depth Test: check
Allow Custom Depth Writes: check