I guess you have to use a osg::Texture1D instead of osg:Texture2D regards Ralph
Michele Bosi schrieb: > I setup a texture to the shader node but it doesn't seem to solve the > probem, here's how I setup my shader: > > mOsgRoot = new osg::Group; > osgFX::Cartoon* toon = new osgFX::Cartoon; > viewer-> setSceneData(mOsgRoot); > mOsgRoot->addChild(toon); > toon->addChild(mEditor->osgGroup().get()); // this is the scene > graph with various objects > > // apply the texture > > osg::ref_ptr<osg::Texture2D> texture = > TextureManager::get()->loadTexture( "cartoon.tga" ); // half > translucent red textue > toon->getOrCreateStateSet()->setTextureAttributeAndModes( 0, > texture.get(), osg::StateAttribute::ON || > osg::StateAttribute::OVERRIDE ); > > I tried with different textures, black, gray, white, with and > without alpha channel without luck. > Is there a specified needed size for such a texture? do I need only > the color information or also the alpha? > > I also attached a file showing the gray molecule. > > Thanks, > Michele > > > ------------------------------------------------------------------------ > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

