Original Post
hello all,
After a while for researching shadow map, I come down to a couple of questions. Can anyone shine them to me?
1)when get shadow map from light point, what should be projection matrix? I can see the shadow is different by FOV. My current light projection is the same as camera projection.
2)I heard I can get shadow map from color buffer insetad of depth buffer, typically color texture is 3-D texture and depth texture is 4-D texture (mean D3DTTFF_COUNT3 and D3DTTFF_COUNT4 when projecting respectively). What makes the different? I can still use 4-D texture for color buffer but the results of shadow are distinct between 3-D texture and 4-D texture for color buffer!!! why?
3)Although the hardware supports depth shadow map (CheckDeviceFormat with D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE) but my depth texture is quite white!!!! no geometry at all??? why??? I am sure I set render target and restore the state perfectly.
FYI: my video card is GEForce FX 5200, 128 M
Thanks in advance
Khanh