Okay, so you are modifying depth testing by attaching an osg::Depth object to the stateset... which OSG maps to glDepthFunc() glDepthRange() OpenGL API calls.
As you are not modifying gl_FragDepth and not using any fragment discard, the early Z testing would still apply before entering the fragment shader. But I am not an expert with this, so I will leave it to other people to jump in with possible explanations for any mismatch between fixed function and shader pipeline that you are seeing. Christian 2017-07-14 14:37 GMT+02:00 Yanwei Guo <expectan...@sina.com>: > Hi, > The code is in the attachment. > And the shader files are at end of the code. > > TIA. > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=71275#71275 > > > > > _______________________________________________ > 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