The algorithm I mentioned is correct but I'd forgotten to account for the fact that I was set up so that the far reported as 0 and the near as 1. My code now reads
LinearDepth = 1.0 - ((2.0*near)/(far+near-(1.0-nonLinearDepth*(far-near))) I can now select/deselect DO_NOT_COMPUTE_NEAR_FAR and get similar results. It's not tested yet and I'm not sure where the discrepancies occur but I'm in the right ball park at least. ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36561#36561 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

