Original Post
Hey,
I recently added support for Shadow Volumes to my engine. Because I couldn''t stand inside the shadow, I decided to implement Carmack''s Reverse.
Well, now I can indeed stand inside the shadow without any problems, but the shadows look very weird, and also, I can see the shadows through the terrain.
When I do not use Carmack''s Reverse, the shadows look ok:
http://legend.demons.org.il/shadows-good.jpg
When I do use Carmack''s Reverse, this is how the shadows look like:
http://legend.demons.org.il/shadows-bad.jpg
http://legend.demons.org.il/shadows-bad2.jpg
This is my rendering function:
http://legend.demons.org.il/ShadowFunc.cpp
I have no idea what''s wrong. I tried several things to do, but none worked. What am I doing wrong?
Thanks,
Yuval
P.S. Please ignore the textures on the house - the model is using the wrong files