Reputation: 8866
In Nvidia's GPU Gems Chapter 9 it says that the projection matrix for generating shadow volumes should have its far plane at infinity so that the shadow volume is not cut off. Since the projection matrix for the shadow volumes ends at infinity, I assume that the projection matrix for every draw pass in the scene should also have its far plane at infinity.
Doesn't this reduce the quality of the depth testing because the same number of bits are being used over a greater depth? Do people really use a far plane at infinity, and does it work out OK? Or is there another approach?
Upvotes: 1
Views: 389
Reputation: 22717
Yes, I use an infinite far plane, and it works fine. If you do the math, the near plane is a lot more important to conserving depth bits.
I've written down my own take on the math here: http://www.jwwalker.com/pages/depth_resolution.html
Upvotes: 2