Hi Glenn, I don't have time to look into this right away, hopefully I'll have time next week.
In principle SDF and GREYSCALE should be aligned the same way, and the rendering result should be broadly similar. At this point I can't think of reason for differences that you have observed so will have to put in some time with your test code and the osgText source code to see what might be going on. Robert. On 1 February 2018 at 17:47, Glenn Waldron <[email protected]> wrote: > Robert, > > I've been working with your new osgText implementation. The improvement in > quality is great, especially with outlines and SDF! > > I did notice something interesting however. The GREYSALE and SDF shader > techniques yield different extents when you call Text::getBoundingBox(). > Since I use the bounding box to align elements on the screen, this became > immediately obvious when switching to the new osgText code. > > Here is a simple program you can use to validate: > https://pastebin.com/WhFsQSMT > > In the "osgtext" example, you can also see a wider margin in the alignment > box when using SDF vs. GREYSCALE. > > The SDF technique uses a non-zero glyph texel margin, which I believe > accounts for this difference. That got me wondering whether the various > AlignmentType techniques ought to be compensating for this extra margin as > well. > > Your thoughts? Should the two techniques be drawing at the same location? > > Glenn Waldron > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

