   Deferred Renderer and Spot Light Volume
  Hey,i'm working on a rendering engine and i need to use a cone for a spotlights volume but I do not know the required maths to set up the world matrix of the cone in relation to the attributes of the spotlight such as radius and outerConeAngle. What I need to do is create a cone that encompasses a spotlights outerConeAngle so i can perform lighting calculations on the pixels within this volume but i do not know how to transform the cone using its world matrix so it matches the spotlight's attributes.Spotlight attributes which I believe are used in the transformation are LightRadiusOuterConeAnglePosition   
  In my old deferred renderer I had a mesh saved in a .X file that was a cone whose point started at <0,0,0>, and then the "circle" part of cone was 1 unit in radius.  So the center of circle would be located at <0, 0, 1> (I used left-handed coordinates), and the circle would hit the points <-1, 0, 1>, <-1, -1, 1>, <1, 0, 1>, and <1, 1, 1>.To render the cone with the correct position, orientation, and scale I would create a standard world matrix that I would use to transform it in the vertex shader.  Position is easy, you just use a translation matrix like you would for any other object.  Then for the LightRadius (range), I would set the Z scale to scale to radius since the cone is 1 unit long.  For the outer cone width, I used a Y scale and an X scale that I figured out using some trig.  See you already know the distance from the point of the cone to the circle (since it's the LightRadius), which gives you the "adjacent" part of a right triangle. You also know the angle, since that's your OuterConeAngle.  What you need is the "opposite" part, which is equal to LightRadius * tan(OuterConeAngle).  For the orientation, I just exposed that in my engine as a matrix or quaternion like I would for any other object.  If you wanted you could do it with a "forward" direction, you would just set it as the "forward" vector of a rotation matrix and thenSo you would build your world matrix like this:float xyScale = tan(OuterConeAngle) * LightRadius;Matrix worldMatrix = Matrix.Scale(xyScale, xyScale, LightRadius) * LightOrientation * Matrix.CreateTranslation(LightPosition);When I get home I will double-check my old code and make sure I didn't make any silly mistakes.   ;  Thank you very very much for your reply I could not find any advice anywhere on the interweb. :)   