I need to write a GLSL shader that will be able to calculate the distance between the camera and the object being rendered by each pixel. The catch is that I need those distances to be linear and they need to be in meters, reflecting the real geometry of my scene. There are a number of guides out there describing the GLSL gl_FragCoord.z as giving the pixel depth in some non-linear coordinate eye-space, but as I am not a graphics programmer by trade I'm finding these guides very confusing. This one looks like my best bet: http://olivers.posterous.com/linear-depth-in-glsl-for-real but I'm still not sure what the author means by "real" depth. Any advice on this problem? Thanks!
-Ethan ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44503#44503 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org