Original Post
Hey guys Im trying to do shadows within a vertex and pixel shader and I was wondering if any of you out there either know any good tutorials on creating a projection matrix or can explain it within this thread in plain english. What I want to do is say we have a lightDirection vector that is the light to the vertex and i want to map this vertex from the lights perspective to a plane called Z. So what I think I need is a projection matrix that will map this. So if anyone can explain where I plug in: lightDirection.x lightDirection.y lightDirection.z Z.x Z.y Z.z vertex.x vertex.y vertex.z Or explain the theory behind a projection matrix so I can understand it better.