1. Non Hardware Shadow mapping
I'm investigating shadow mapping and need a few pointers, since all I have
to go by is nvidia hardware shadow mapping example. I've managed to properly
project the texture from the light position using the fixed pipeline (no
vertex shaders) and projective texture generation.
The base example I'm using is
My texgen paremeters
SetTextureStageState(0, D3DTSS_TEXCOORDINDEX, DTSS_TCI_CAMERASPACEPOSITION);
SetTextureStageState(0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTF_PROJECTED |
TexGen matrix = camera_view_matrix(inverse) * light_view_matrix *
light_proj_matrix * texture_offset
texture_offset to get the texture squarely in the middle is
0.5 0 0 0
0 -0.5 0 0
0 0 1.0 0
0.5 0.5 0 0
This projets the texture according to the lights position perfectly, but I
notice that the texture_offset for shadow mapping actually has the bit depth
as the z value (_33) and this does not get operated on the same way as the
texture generation in the fixed pipeline.
Is rendering the depthstencil hardware shadow map exclusive to using the
vertex shaders to do the math?
If all I want to do is project the silouette of the blocking object onto a
recieving object to render a traditional shadowmap, is the standard method
to just set SetRenderTarget(pRenderTargetSurface, NULL); (no depth buffer),
and render the blocking object without lighting and color set to black on a
background cleared with alpha, then projecting this silouette onto the
shadow recieving object as a second pass? I realize there won't be an self
shadowing available as in hardware shadow mapping, but is this the correct
way to do conventional shadow mapping on standard hardware supporting render
to texture? I've heard it mentioned that it was actually the depth buffer
that is supposed to be used as a silouette texture (but perhaps this is only
in the opengl camp).
Thanks, any help would be greatly appreciated.
p.s are there any good web resources/examples on advanced topics for
2. where can i get source for loading DIB files ?
3. hardware shadow maps in DX8?
4. Stupid light/lighting questions
5. New Algo for shadow map generation out of shadow maps
6. problem with CreateDIBSection
7. 3DSmax - Inconsistent vertex ordering in exported output
8. Shadow Map Questions
9. Shadow maps question
10. Question for some shadow mapping expert
11. Questions for Rich[MS], Shadow Mapping in DX9
12. Shadow maps and soft shadows