Help to make bilboard custom Mesh Line Renderer shader

Hello everybody.
I’ve spent many hours trying to make a billboard for the line.
It is necessary to achieve the same effect as in the standard LineRenderer by the shader.
The main problem, I can not project the vertices in the shader, I do not understand how to do it. I have problems with the coordinate transformation (

vector _LineStart;
vector _LineEnd;

v2o vert(v2i i){
v2o o;
// 1) World positions:
float4 posstart = _LineStart;//mul(UNITY_MATRIX_MVP, );
float4 posend = _LineEnd;//mul(UNITY_MATRIX_MVP, );
vector dir = _LineEnd - _LineStart;
// 2) Normal to camera-lineDirection vectors
float3 normal_ = normalize(cross(_WorldSpaceCameraPos-posstart.xyz, dir.xyz));
// 3)
i.vertex.xyz+=normal_;
o.pos = mul(UNITY_MATRIX_MVP, i.vertex);
...
}

Here is my attempt to write a vertex shader map … Do not look at it, it does not work. Help, can anyone have such a shader? Ideas? How to do it?

Now a new problem. I put the world coordinates in the shader. Then, coordinate transformation is as follows:

o.pos = mul (UNITY_MATRIX_VP, i.vertex);

But experiments have shown that the clipping boundaries of the mesh is now invalid.
Of course, I call mesh.RecalculateBounds (); But the problem is that they need to be corrected because UNITY_MATRIX_VP.

How can I do that? I was looking for information on the network, but found nothing :frowning:

I knew how to solve the problem of the disappearance of the mesh (need to change mesh.bounds).
I do the following:

Bounds b = mesh.bounds;
 b.center = transform.position; 
 b.size = transform.InverseTransformPoint(end) - transform.InverseTransformPoint(start);
 b.extents = b.size * 0.5f;

 DrawBox();

  // mesh.RecalculateBounds ();

But nothing happens.
If I call RecalculateBounds (), then it does not work with my parameters.
This is a bug or something? How to change the boundaries of mesh culling?

bump, interested in this too, here maybe some info Stretched Billboard Projected Particles - Graphics and GPU Programming - GameDev.net