Hi,
I just want to blend the texture. In my case, I have geometry within a
node and a stateset with a texture read from an imagefile. Now the
imagefile is not transparent or something. Is it possible just du make
only the texture more transparent without making the color from the
geometry transparent? I just want to modify the alpha of the texture. I
paste also the code that you can see what I mean.
osg::ref_ptr< osg::Geode > geode = new osg::Geode;
osg::Image *texImage = osgDB::readImageFile("Images/lz.rgb");
osg::Texture2D *tex = new osg::Texture2D( texImage );
osg::StateSet *texState = new osg::StateSet;
texState->setTextureAttributeAndModes( 0, tex, osg::StateAttribute::ON );
osg::ref_ptr<osg::ShapeDrawable> shape;
shape = new osg::ShapeDrawable(new osg::Box(osg::Vec3(0.0f, 0.0f,
-2.0f), 100.f, 100.0f, 0.1f), hints.get());
shape->setColor(osg::Vec4(0.9f, 0.1f, 0.1f, 1.0f));
geode->addDrawable(shape.get());
geode->setStateSet( texState );
Thanks,
Marcus
Ulrich Hertlein schrieb:
Marcus Fritzen wrote:
file ( ... new osg::texture2d( osgDB::readimagefile(...) ) ). This
texture I attach with a stateset to the geode. Now I want to blend just
the texture. I can blend the whole geode, but I don't know how to blend
just the texture.
Could you be a bit more specific what you mean by 'blend just the
texture'? Is the texture on a separate piece of geometry that you want
to blend? Or are you looking for ways to blend the texture with the
underlying material/color?
/Ulrich
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
--
----------------------------------------------------------------
Marcus Fritzen E-mail: [EMAIL PROTECTED]
University Koblenz Mobil: +491786867360
Triererstr. 105, 56072 Koblenz,
HIWI FB4 Herr Jackel
----------------------------------------------------------------
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/