   billboard vertex shader
  How can I do the orientation of a billboard in a vertex shader, that will work for a space game? I have used several techniques but they all produce the artifact of the billboard roll axis matching the vehicles. This makes it useless for imposter rendering.   
  I have found the issue but dont yet know the answer. Problem is I am not apply the roll transformation from the view when rendering the billboard. Is there a way to isolate the roll transformation from the view matrix in this shader code? It works well for rendering billboards but the billboard appears to roll when I roll the camera because the roll of the camera isn't applied to it.PixelInput VS(VertexInput In) {PixelInput Out = (PixelInput)0;//transform the position of the billboardOut.Position = mul(g_Position,g_View) + float4(In.Position,1) * g_Scale;    Out.Position = mul( Out.Position, g_Projection );    Out.UV = In.UV;    return Out;}   ;  Solved the issue by adding a second view matrix which has only the roll of the camera. I create it along side the view matrix. Here is the shader code I used so others may not suffer hours of frustration as I did.PixelInput VS(VertexInput In) {PixelInput Out = (PixelInput)0;Out.Position = mul( float4(In.Position,1) , g_RollOnly);    Out.Position = mul( g_Position, g_View ) + Out.Position * g_Scale;    Out.Position = mul( Out.Position, g_Projection );    Out.UV = In.UV;    return Out;}   ;  i wrote 3 options for "camera facing" of billboards.* use the plane of the camera as the plane of the poly* lock in the Y axis and rotate around that* use the plane that is represented by the normal from centre -> cameraeach offers its own pro's & cons.   