View Full Version : zbuffer to range measure?
03-17-2004, 09:20 AM
I know I've seen a formula for converting the values returned by reading the zbuffer with glReadPixels() into distance from eyepoint. But now that I need it, I can't find it. Can anyone point me in the right direction?
03-18-2004, 10:57 AM
Remember this will give you eyespace z not distance. You'll need to compensate for tan theta if sampling off center from the view vector. Range is only equal to z if eyepace x & y are zero.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.