Original Post
Howdy, I''m having some trouble finalizing the PSM math, thus far, I''ve concieved the following steps:
1. Translate the world From the camera''s view (gluLookat from the camera) And store the modelview and projection matrcies (MV and P)
2. Transform the light position by the matrix, giving LightPos=P*MV
3. do a gluLookAt(lightPos.x,lightPos.y,lightPos.z,0.f,0.f,0.f,0.f,0.f,1.f); which looks at the center of the unit cube, and grab the new modelview matrix from this process (MVL)
4. Compute the perspective opening angle to enclose the entire unit cube, grab the projection matrix from the process (PL)
5. The final projection matrix is PM=PL*MVL*P; And the MV stays the same as the transformed camera MV (not MVL)
6. Load up the PM and MV matrcies via LoadMatrix()
7. Render the scene and load into a shadow map
Now, i think i have this process right, but when i project the texture, and render the final scene, I''m getting no results. I''m not even sure if the texture has any data in it.
Can someone please help me with where my math is going wrong on this?
thanks
~Main
==
Colt "MainRoach" McAnlis
Programmer
www.badheat.com/sinewave