Hi Ralf,

On Thu, Mar 18, 2010 at 9:22 AM, Ralf Stokholm <alfma...@arenalogic.com> wrote:
> Im not sure if this is the last time it was changed, but inspecting the log
> it was changed a revision 6602 from

Thanks for the detective work.  From Tracs the changes are:

http://www.openscenegraph.org/projects/osg/changeset/6602/OpenSceneGraph/trunk/src/osgText/Font.cpp
http://www.openscenegraph.org/projects/osg/changeset/6602/OpenSceneGraph/trunk/src/osgText/Text.cpp


>From what I can make out the texture coordinate set up is the part
that is critical, and the new code is effectively using
xpos/(textureWidth-1) to compute a texture coordinate, while for
Farshid and others are reporting that use of xpos/(textureWidth-0) is
producing better results.

However there is more going on with margins and the actual quad
geometry that Text.cpp uses, as well as the potential for the clamp
mode on the texture to effect things as well, so right now I'm not
ready to make any decision about what the correct code should be, but
it's likely to involve more than just changing a 0 to 1.  I suspect a
wider review of the maths of placement of the glyphs in the texture,
the maths used by the GPU to map the tex coordinates to the texels,
and the sizes of the quads used by Text.cpp.  Note the quad geometry
will be oversized slightly to make sure that mipmapping does loose the
border of the glyph.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to