Archived

This topic is now archived and is closed to further replies.

tSG

Shadow volumes

Recommended Posts

Hey folks, I have a strange artifact in my volumetric shadows. It seems that because of the far clip plane it didn''t work well, and that way the stencil is above 1, even there where it shouldn''t be. Is this a known artifact by shadowing? Is there a way to solve this problem? I''ve read somewhere that John Carmack had solved that kind of problems but the link was broken so I couldn''t get cleverer Thanks for every replies in advance! -- tSG --

Share this post


Link to post
Share on other sites
John Carmack says that Nvidia and ATI sdks are best place to start. NVIDIA has a perpixellighting demo(using shadow volume or depth map) with source code.

Share this post


Link to post
Share on other sites
> I've read somewhere that John Carmack had solved that kind of problems but the link was broken so I couldn't get cleverer

Yes, he called it "Carmack's reverse". Run Google on that, you should get lots of sites. Or the Nvidia SDK site has a collection of very useful papers about that (Here).

Edit: Take this paper, it's exactly want you need.

Edited by - Yann L on February 17, 2002 10:57:35 PM

Share this post


Link to post
Share on other sites
tSG: are you using Carmack''s algorithm or no ? Because only Carmack''s "reverse" algorithm get problems with the far plane.
Assuming, you''re not using Carmack''s reverse, you may experience problems with the near clipping plane.

Share this post


Link to post
Share on other sites
Thanks for the sources of info, I will dig into the docs.

vincoof: I dunno I use the standard shadow voluming, but it was the far clip plane which caused the problem. Btw. I''ve found a solution for the problem: I have to draw a huge rectangle at the place of the far clip plane meanwhile depth-test is enabled. The artifact was caused by the fact that in the far the shadow volumes are "deleted" so there is only a front shadow volume(the counterpart back shadow volume is clipped) and the stencil buffer is set to 1.


-- tSG --

Share this post


Link to post
Share on other sites