Original Post
Hey guys...I've recently implemented realtime shadow maps into my game "Gang War", it's coming along very nicely, I'm just about done with 'em. I'm rendering 2 shadow maps every frame, a global shadow map that covers the entire city, and a local shadow map that is focused on the camera, and I blend between the two. Here are 2 videos showing how it looks in-game (you'll need DivX to watch these)....
Anyways...I'm implementing alpha testing for fences, trees, etc. It doesn't seem to work. I was under the impression that shadow maps could easily support alpha testing in the shadows...ie: when rendering the scene from the light's perspective, just don't render texels that fail the alpha test. Though it doesn't seem to work. I've tried rendering the shadow map overlayed on screen and all parts that should fail the alpha test, and not be rendered, appear black (and cast a shadow). I'm explicitly enabling alpha testing right before rendering to the shadow maps, and setting the ALPHA_REF as well. Alpha testing works fine in every other part of the scene, though it doesn't seem to work for the shadow maps, here is another screenshot showing the problem....the shadow of the fence isn't alpha tested :-/
Is there something I'm missing? Is there a special way to use alpha testing when rendering shadow maps? I'd appreciate any help/advice you guys might have to offer. - Dan [Edited by - dgreen02 on December 10, 2005 3:44:03 AM]
Anyways...I'm implementing alpha testing for fences, trees, etc. It doesn't seem to work. I was under the impression that shadow maps could easily support alpha testing in the shadows...ie: when rendering the scene from the light's perspective, just don't render texels that fail the alpha test. Though it doesn't seem to work. I've tried rendering the shadow map overlayed on screen and all parts that should fail the alpha test, and not be rendered, appear black (and cast a shadow). I'm explicitly enabling alpha testing right before rendering to the shadow maps, and setting the ALPHA_REF as well. Alpha testing works fine in every other part of the scene, though it doesn't seem to work for the shadow maps, here is another screenshot showing the problem....the shadow of the fence isn't alpha tested :-/
Is there something I'm missing? Is there a special way to use alpha testing when rendering shadow maps? I'd appreciate any help/advice you guys might have to offer. - Dan [Edited by - dgreen02 on December 10, 2005 3:44:03 AM]
