I solved the problem.
If you want to do the same like me or something similar here are two important 
notes:

If you want to move the zFar and zNear clipping plane by yourself you first 
have to call        
camera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR); 
before camera->setProjectionMatrixAs...

The secound hint I can give is that the depth information you get in the range 
of 0 and 1 are not so simple as they look like. To compute the depth in 
camera/world coordinate unit you can't just interpolate linear. Here are the 
formulars to compute from depthbuffer values to z in world/camera coordinates 
and the other way round:http://www.cs.unc.edu/~geom/HOFF/techrep/openglz.html

Regards,
jojo

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=11336#11336





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to