On Wed, Feb 17, 2016 at 10:48 AM, Robert Osfield <[email protected]>
wrote:

> Hi Igor,
>
> The description is useful. In general the OSG just passes along projection
> and view matrices directly to OpenGL.  However, by default the OSG computes
> the near and far in the cull traversal on each frame and uses this to clamp
> the projection matrices so that depth precision is maximized.  The problem
> can arise if you are trying to match two render passes, if they have a
> different depth range then z buffer test will be erroneous so you'll get
> fragment clipped or not clipped.  Could this be the issue?
>
> To disable the compute near far simple do:
>
>
> viewer.getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
>
> You can find all the settings in the include/osg/CullSettings.
>
>

I have found it useful to force the projection matrix using the
osg::Projection node.  That avoids any issues with OSG modifying the
projection matrices.

J.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to