How can such a material be created in the material graph? Or how can this same material be applied to user created primitives?
This only has to work for boxes. Doesn’t have to be smooth or antialiased. Thickness should be constant regardless of viewing distance and angle just like the example.
Attempting this in the pixel shader using UVs works somewhat but scaling reduces the line thickness and ruins the effect.
The closest way that I know is to use a post-process material and then enable “Set Render Custom Depth” on the specific mesh you would like to highlight. Attached a video below that goes over how to make the material and apply it via Blueprints
the convoluted way is to create the quad wireframe mesh manually using a procedural mesh. there is no line list render mode available, tho. you’d have to build it out of polygons. and those would not scale accordingly to camera depth.