Original Post
I''ve googled this subject many times, even read through the article on gamedev, but I''m still kind of in the dark here; could somebody explain carmack''s reverse to me?
quote:
Original post by JohnBolton
When determining whether or not a pixel is in shadow, you can compare the number of shadow volume front and back faces that are in front of the pixel ("zpass"), or you can compare the number of shadow volume front and back faces that are [u]not[/u] in front of it ("zfail"). The results are the same.
There are serious complications. The zpass result will be wrong if the near-plane clips a shadow volume. The zfail result will be wrong if the far-plane clips a shadow volume. The errors are especially difficult to correct using the zpass technique.
The advantage of zfail is that it is much easier to overcome the far-plane clipping problem than the near-plane clipping problem.
The zfail technique is also called "Carmack's Reverse" because of a widely circulated email by John Carmack where he explains how he realized an advantage of zfail -- the far-plane clipping problem can be overcome by capping the shadow volumes. Though capping the shadow volumes is not perfect and not trivial to implement, it is much easier and more effective than any solution for overcoming the near-plane clipping problem of zpass.
In 2002, Everitt and Kilgard demonstrated how moving the far plane to infinity also elminates the far-plane clipping problem and removes the need to cap the shadow volumes.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more