GeForce hardware shadow map questions?

GeForce hardware shadow map questions?

Post by Ronny Burkersrod » Fri, 04 Jul 2003 18:14:45

Hi guys,

does anybody know, if the comparative z-value for hardware shadow maps on a
GeForce 3 or higher has to be the z-component of the texture coordinate?
Does the w-component have got any effect? In Direct3D 9 the comparative
value has to be between 0.0f and 1.0f. Can I use the view projection matrix,
with which the depth map was created, to calculate the texture coordinate or
do I have to look for something else?



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


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