You call the function after setting the (inverse) matrix of the camera, and before any object transformation (rotation + translation). That's because the matrix is multiplied, to combine with the inverse of the camera.

This just projects the points of the objects to the plane. I also don't understand the maths because I copied it from the internet, but it works in my game.

hi how does the calculation take place in those 4*4 matrix exactly ??why is that they are subtracting with the dot can u be more precise on the shadow matrix please??

Dark Photon

05-25-2010, 05:59 PM

hi how does the calculation take place in those 4*4 matrix exactly ??why is that they are subtracting with the dot can u be more precise on the shadow matrix please??
Well read the page, and just think about it. What are we doing geometrically? Intersection of a 3D line and a 3D plane, right? Write the equations, plug one into the other, solve, and there you go.