shadow map proiection
I'm tryng to using shadow map for directX but I don't undestand an important passage of the technique.
I render on a texture the scene from the light position using pixel shader to render the distance (I use R32 texture format) but when I render the scene I can't project it on the scene.
I use this formula for generating texture coordinate for shadow map:
value=position x WVP matrix that I use for shadowmap rendering
value.xyz/=value.w
now xyz must be in the range of -1,1
(value+1)/2 must gave me the right texture coordinate.
But they are wrong. I lost some passages, can you help me?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement