Re: [osg-users] depth buffer -> real pixel z - depth
Thanks for your answer, but how do you mean this? Real_depth = inverseProjectionMatrix * [0.0, 0.0, depth, 1.0] Is that correct? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Monday, September 17, 2007 10:29 AM To: OpenSceneGraph Users Subject: Re: [osg-users] depth buffer -> real pixel z - depth On 9/16/07, zarrandreas <[EMAIL PROTECTED]> wrote: > Hi, > > I render depth buffer to the image, but values I have there are between > [0.0, 1.0]. > > How can I get real z-depth? You'll need to use the inverse of the projection matrix. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] depth buffer -> real pixel z - depth
Thanks a lot! This is what I need. :-) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Daly Sent: Wednesday, September 19, 2007 2:56 AM To: OpenSceneGraph Users Subject: Re: [osg-users] depth buffer -> real pixel z - depth zarrandreas wrote: > Hi, > > I render depth buffer to the image, but values I have there are between > [0.0, 1.0]. > > How can I get real z-depth? > This page explains a simple conversion pretty well: http://www.cs.unc.edu/~hoff/techrep/openglz.html --"J" ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] depth buffer -> real pixel z - depth
zarrandreas wrote: > Hi, > > I render depth buffer to the image, but values I have there are between > [0.0, 1.0]. > > How can I get real z-depth? > This page explains a simple conversion pretty well: http://www.cs.unc.edu/~hoff/techrep/openglz.html --"J" ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] depth buffer -> real pixel z - depth
On 9/16/07, zarrandreas <[EMAIL PROTECTED]> wrote: > Hi, > > I render depth buffer to the image, but values I have there are between > [0.0, 1.0]. > > How can I get real z-depth? You'll need to use the inverse of the projection matrix. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org