Line visibility issue while using procedural mesh

Hallo

I made a pyramid with lines using the procedural mesh and wireframe concept. I made the pyramid using four triangles and it is working ok for some camera angle. But when the camera angle changes, some of the lines/triangles disappear. Is it due to the bad UV because while creating the procedural mesh as i didnot gave anything for UV0. Any comments?

Turned on two sided in material and solved