Hello everyone,
Quick shadow mapping question:
I have shadow mapping working (using DirectX 9) based on the soft shadow tut here on gamedev.
The problem I have is that I have the static scene lightmapped (walls, buildings, etc.) and I don't want those casting shadows. I only want the dynamic models such as the player to cast shadows.
But I still need the depth from the static models otherwise the shadows won't look correct.
For example:
The player model is standing on a bridge. Shadow light is directly above him. His shadow appears correctly on the bridge road, but the same shadow also appears on the ground under the bridge, where of course there shouldn't be any visible shadow since the bridge would block the player's shadow. (the bridge itself isn't a shadow caster since it's part of a lightmapped scene).
How can I make geometry block the shadow casting? Is there something simple I am missing and need to add some sort of extra depth checking pass to the shader?
Can anyone tell me what's needed? Many thanks in advance!