[osg-users] osgText - shimmer...wavy
robert.osfield at gmail.com
Tue Oct 16 08:25:14 PDT 2007
On 10/16/07, sherman wilcox <wilcox.sherman at gmail.com> wrote:
> See attached.
Thanks for he example, I can see the shimmering effect. The artifact
kinda looks like texture minification/aliasing issue - but just as
easily could be a straight precision issue on the computation of the
corners of the quads for each character. The big question is.. which
might it be...
I tried altering the font resolution size but this didn't affect the
shimmering which I would have expected at a bit of difference if the
issue was a mipmap quality issue. However, this basic test can't rule
it out as a possibility. The mipmaps for text are computed using the
hardware mipmap extension where supported (its support by most modern
hardware), the quality won't be the best attainable if done is
software though. While I can't rule texture aliasing as an issue this
out yet, it probably makes sense to look at the next likely
The code Text::computePositions found in src/osg/Text.cpp does
compute the matrix in doubles which is good, but it does a transform
of the corners of the character quads which will be in floats, and if
the position has a large offset - as is the case in this example then
precision will be an issue for objects that are near to each other.
Placing a MatrixTransform over each text object to position should
help in this situation, with the transform of the quad corners done
with a local origin. The other alternative is to put this transform
directly inside the text object to provide the large position support.
More information about the osg-users