From 9bf3d2b7cee83952d53d7b5778394a69b7fad208 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 9 Dec 2017 11:12:35 +0000 Subject: [PATCH] Pushed background image away from eye point a small amount to prevent z fighting with text on the image plane. --- src/osgPresentation/SlideShowConstructor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osgPresentation/SlideShowConstructor.cpp b/src/osgPresentation/SlideShowConstructor.cpp index 2ab07cedd..450c67b1a 100644 --- a/src/osgPresentation/SlideShowConstructor.cpp +++ b/src/osgPresentation/SlideShowConstructor.cpp @@ -484,7 +484,8 @@ void SlideShowConstructor::addLayer(bool inheritPreviousLayers, bool defineAsBas bool useTextureRectangle = true; float s = useTextureRectangle ? image->s() : 1.0; float t = useTextureRectangle ? image->t() : 1.0; - osg::Geometry* backgroundQuad = osg::createTexturedQuadGeometry(_slideOrigin, + osg::Vec3 backgroundShift(0.0f, _slideWidth*0.0001f, 0.0f); + osg::Geometry* backgroundQuad = osg::createTexturedQuadGeometry(_slideOrigin+backgroundShift, osg::Vec3(_slideWidth,0.0f,0.0f), osg::Vec3(0.0f,0.0f,_slideHeight), s, t);