Depth shadow mapping problem

Started by
25 comments, last by DaJudge 20 years, 6 months ago
Hi DaJudge,
I have got the same problems you have. I am not able to create a renderable depth-texture. It does not depend on the format, it is always the same result. When I first implemented the standard shadow mapping alogrithm I was using a floating point target (Radeon9700 btw), which was very slow. And because I was using a color target I had to do all the comparisons of the depth values in the pixel shader, and I did not even know that d3d would do this for me if I had a depth target, because I expected d3d to have a renderstate to enable this feature, just l
ike OpenGL. And the filtering wasn't that nice, too.
Even Paul's shadow mapping demo (http://www.paulsprojects.net/direct3d/shadowmap/shadowmap.html) doesn't work here.

This thing really fu**ed me up (and other things in d3d too) ant that's why I decided to use OpenGL, because one really cannot do without shadow mapping these days and I dislike shadow volumes..
In GL I had no problems with shadow mapping, but there are still problems, though.

cu,
hWnd

[edited by - hWnd on October 16, 2003 8:15:33 AM]
Advertisement
Hi hWnd,

well, since I intend to port my program to the XBOX I don''t really want to go for OpenGL. Although shadow mapping would really be worth the effort. I do dislike shadow volumes as well (silhouette generation, non closed meshes, shadow volume generation, clipping plane problems etc. etc.). Depth shadow mapping seems to solve pretty much all these problems at once.

You''re right Paul''s project does not work here either (would be interesting to get out which configuration he is using though). But here it''s not the problem I have (all shadow) but exactly the opposite (all in light => no shadows, just diffuse). So maybe he''s doing things some reverse way - didn''t have a look at his source (since it was defunct).

Any ideas?

Thanks,
Alex
Alexander Stockinger
Programmer
Are you using DirectX9? The depth range was changed from (0, MAX INTEGER) to (0,1). This means that all DirectX8 shadowmapping samples converted to DX9 will not work out of the box. But if you try a DirectX8 sample without converting the interface to DX9 it should work fine. Anyway, you need to change your shadow matrix for DX9 (I''ve got this to work but my code isn''t with me, to start try changing range from 0xFFFFFFFF >> (32 - 24) to 1.0f). Anyway, this is documented somewhere but you have to look for it to find it.
Well, it''s DX8, so that''s not the prob either...

Thanks anyway.
Alexander Stockinger
Programmer
Sorry I can''t help you more, my D3D knowledge is too sparse for that.

Want me to move this thread to the DirectX forum ? Perhaps you''ll get better responses there.
Please do so. I really hope anyone can help me with that and if you think I might get some tips there I''d be really happy about that.

Thanks,
Alex
Alexander Stockinger
Programmer
There you go. It''s worth a try.

This topic is closed to new replies.

Advertisement