LineRenderer: how to draw line intersections?

I need to draw good looking line intersection. Like this:

I understand how to draw such a line with LineRenderer. I should use a custom texture:

But I do not know how to draw good-looking lines intersection without ugly overlapping.

Is it possible to do it in Unity?

One way of doing this is multi-pass shaders.

Here, for example:

  • pass #1 draws black fill

  • pass #2 uses ZWrite Off BlendOp Max to mix the the overlapping b&w textures together.

But this is not an universal solution and works fine with very specific grayscale textures. That being said - other variants can be figured out too (given both time and shader knowledge).