Thank you. On Tuesday, May 10, 2022 at 7:53:09 PM UTC-5 [email protected] wrote:
> DC, > Check out the ProjectionMatrix functions in osgEarth, they might be of > some help. > https://github.com/gwaldron/osgearth/blob/master/src/osgEarth/Math.cpp#L518 > > On Monday, May 9, 2022 at 6:43:26 PM UTC-4 [email protected] wrote: > >> Hello, >> >> Has anyone here been successful in creating a reverse z buffer for OSG? >> >> I have done the following: >> >> - Created osg::Depth global state attribute to be GREATER and 1.0 to >> 0.0. >> - Created osg::ClipControl global state attribute to be LOWER_LEFT, >> ZER0_TO_ONE >> - Set camera's clear depth to be 0. >> >> I can render a scene and view the depth buffer and it's "reversed". That >> is, close objects are white and distance objects are black. But I'm also >> supposed to modify the projection matrix, which is where I'm stuck. The >> result is either nothing rendering or some very circus mirror looking >> objects. >> >> Thanks, >> DC >> >> >> -- You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/8d90addb-a048-4720-bae3-c851ffdd7124n%40googlegroups.com.
