   view matrix roll component
  Is there a way to extract the roll component of a view matrix.I need to roll my billboards in my shader so they look right. This works well but I need to apply the roll of the camera only to In.Position but am not sure how.PixelInput VS(VertexInput In) {PixelInput Out = (PixelInput)0;//transform the position of the billboard    Out.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;}   
  Cross post: http://www.gamedev.net/community/forums/topic.asp?topic_id=534150You'll need to use a more creative way to control your billboard polygons. It will require building a unique transform for each billboard based on the current camera position, the particle position, and some axis of rotation for your billboards.Here's a good article: http://www.lighthouse3d.com/opengl/billboarding/index.php3?billCheat1I dont like the way you do spherical billboards in shader, you'll need to use another vertex attribute to pass the billboard rotation axis, which fits in better with the other method of vertex spherical billboards where you transform the center point into viewspace and then add a size component which is stored per vertex.So each vertex shares the same location but has a unique screenspace offset vector. You'll want to pass in an axis vector as well. This appears to be what you're doing, only you set the billboard position with a shader constant?edit: that article actually doesnt apply very directly but may give you some ideas.You'll transform the axis along with the center point into view space. then create an orthogonal other axis. Then apply your size along these axes. If you refound the original axis you could make spherical billboards which still respected their up direction, which may be what you want.This probably makes no sense at all but i dont want to just write it for you :P   ;  thanks for your help, however I found a simpler answer. I added a second view matrix with only the roll transform. here is the shader I now use.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;}   