Hi Preet,

This look to be an issue of depth precision, the usual way one tackles
this problem of rendering two flat objects on top of each other is to
use osg::PolygonOffset (see OpenGL docs on glPolygonOffset).

Robert.

On 20 January 2013 05:42, Preet <[email protected]> wrote:
> I have two geometries close together -- one is an osgText object and the
> other is just a simple set of planar triangles laying flat behind the text.
> The two are separated by a small distance. Both objects are parented with an
> AutoTransform.
>
> When I move my camera around in a certain way, the object behind the text
> bleeds through it. When the camera is not being moved, both objects appear
> fine. I made a small video because I had trouble capturing the issue with a
> screenshot. In the video, the text is purple. The object in question is the
> black rectangle with the purple border behind the text.
>
> http://www.youtube.com/watch?v=htj168dJHGw
>
> When I move the camera relatively fast, you can see the black rectangle's
> triangles bleed through the text momentarily.
>
> I tried messing around with the placement of the objects; I even tried to
> increase the distance between the text and the geometry behind it a
> substantial amount but this didn't seem to have an effect. Both objects are
> in the same render bin.
>
> I've never really seen something like this happen before where the effect is
> only present *while* the scene is moving around. If I move the camera around
> slow enough or keep it still, the effect isn't visible.
>
> Does anyone have any ideas as to what the issue is here?
>
>
> Preet
>
> _______________________________________________
> 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

Reply via email to