From 38a240884705d9c42cfa5ae1acd22e607add21a0 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 20 Mar 2003 08:58:51 +0000 Subject: [PATCH] Changed the shadow texture implemention to use CLAMP_TO_BORDER for the WRAP_S and _T modes. Also set the border colour to 1,1,1,1 to ensure problem blending. --- examples/osgshadowtexture/CreateShadowedScene.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/osgshadowtexture/CreateShadowedScene.cpp b/examples/osgshadowtexture/CreateShadowedScene.cpp index 9926f72a8..3546fa174 100644 --- a/examples/osgshadowtexture/CreateShadowedScene.cpp +++ b/examples/osgshadowtexture/CreateShadowedScene.cpp @@ -26,6 +26,9 @@ class CreateShadowTextureCullCallback : public osg::NodeCallback _texture = new osg::Texture2D; _texture->setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR); _texture->setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR); + _texture->setWrap(osg::Texture2D::WRAP_S,osg::Texture2D::CLAMP_TO_BORDER); + _texture->setWrap(osg::Texture2D::WRAP_T,osg::Texture2D::CLAMP_TO_BORDER); + _texture->setBorderColor(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); } virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)