Hi Robert, Ok it makes sense to change it to -1 and 1.
Thank you, Michael Mc Donnell On Mon, Mar 2, 2015 at 6:04 AM, Robert Osfield <[email protected]> wrote: > Hi Michael. > > I have merged the change, with a small tweak of changing to a -1 to 1 > bounding box as I'm guessing the original code was written for a unit radius > sphere. > > The clipping problem is actually caused by the osg::Geometry default > bounding box being based in the input vertices, but the tessellation shaders > create new vertex positions outside the bounding box of these input vertices > so in certain viewing directions the near/far clipping planes based on the > original input bounding box is incorrect. > > Setting the InitialBound like you did is the decent way to handle cases like > these. The alternative to this would be to create a > ComputeBoundingBoxCallback that provides the correct bounding box. > > Robert. > > On 1 March 2015 at 23:29, Michael Mc Donnell <[email protected]> wrote: >> >> Hi Robert, >> >> The tessellation shader example has a small bug.The middle of the >> geometry is clipped as soon as it is tessellated. The clipping is >> probably caused by rounding errors because it is only in one spot. The >> clipping disappears when the camera is moved, and reappears when it is >> moved back. Expanding the the bounding box fixed the clipping bug. >> >> I have attached the fix as a patch file and the whole file itself. >> Written against svn revision 14745. >> >> Thank you, >> Michael Mc Donnell >> >> _______________________________________________ >> osg-submissions mailing list >> [email protected] >> >> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org >> > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
