Advertisement

Shadow volumes

Started by February 17, 2002 04:14 PM
4 comments, last by tSG 23 years ago
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 --
-- tSG --
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.
Game Core
Advertisement
> 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
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.
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 --
-- tSG --
If you are using the method from NeHe''s tutorial (not written by NeHe btw) then it''s NOT Carmack''s reverse.

This topic is closed to new replies.

Advertisement