PDA

View Full Version : Shadowmapping problem


dajudge
16-Oct-2003, 09:01
Hi all,

I am having serious problems with shadow mapping on my brand new GeForce FX 5200...
And it seems it's not just me. I have the book "Cg tutorial" and the shadowmapping sample shipping on the CD doesn't work either. Another sample on the next (from Delphi3D) doesn't work as well! Only a single demo (the one shipping with the NVSDK) works!

My code does pretty much EXACTLY the same as the NVSDK sample (same texture formats, same depth buffer formats, almost same ordering of commands etc.) but doesn't work as well. I exactly followed NVidia's paper about hardware shadow mapping up to the letter!

When rendering with the backbuffer texture instead of the depth texture all geometry gets projected correctly so nothing is wrong there... I am using vertex and pixel shaders pretty similar to the working one's in the SDK (say, same texture coordinate transformations, same lighting equation, same texture lookups etc.) but the depth texture lookup seems to always return 0, so everything is in shadow.

I am using DirectX 8 with a GeForce FX 5200 and detonator 45.23 drivers.

Any hints?

Thanks,
Alex

Remi
25-Oct-2003, 01:07
Just an idea: Maybe the problem is in your scene rather than in your code: your light might be too far away from your objects, causing rounding errors and returning zeroes...

parhelia
25-Oct-2003, 09:42
shadow mapping only works with NV35, or so I hear

Remi
25-Oct-2003, 17:39
Well, I haven't tried on a 5200, but it does work on a 5600...

dajudge
26-Oct-2003, 00:02
Well, the shadowmapping sample in the NVSDK DOES work on my GF FX 5200...

So that shouldn't be the problem really...

Maybe another idea?

Thanks,
Alex