Matrix.Shadow is gone

Looks like Matrix.Shadow was removed. It was useful in assisting with simple shadow creation. Is there an alternative in XNA or do I need to do the math myself

Answer this question

Matrix.Shadow is gone

  • ctssoms

    Im after the same thing.

    Is there any progress on this matter


  • Matt Lin

    Check the D3D SDK docs, D3DXMatrixShadow Function is well documented and contains all the math and comments needed.


  • Jeanne P

    But that is not a part of the XNA framework right
  • pinoyz

    I'll take a look to see if this is something we can get in. If not, I'll see about posting sample code that would achieve the same thing.

  • abhas

    Why not write a simple utility function Build your matrix like this:

    P = normalize(Plane);
    L = Light;
    d = dot(P, L)

    P.a * L.x + d P.a * L.y P.a * L.z P.a * L.w
    P.b * L.x P.b * L.y + d P.b * L.z P.b * L.w
    P.c * L.x P.c * L.y P.c * L.z + d P.c * L.w
    P.d * L.x P.d * L.y P.d * L.z P.d * L.w + d

    If the light's w-component is 0, the ray from the origin to the light represents a directional light. If it is 1, the light is a point light.



  • Matrix.Shadow is gone