Brilliant! And by having a look in MultiTextureControl.cpp I understand how TexEnvCombine should be setup.
But I don't want to invent the wheel again, so I go for your MultiTextureControl node! :) On Tue, 04 Mar 2008 13:44:38 +0100, Robert Osfield <[EMAIL PROTECTED]> wrote: > Hi Joakim, > > The easiest way is to use the osgFX::MultiTextureControl node as this > allows you to set the relative weights to use for each texture unit. > It just so happens that yesterday I wrote and checked in an > osgmultitexturecontrol example as well - this example adjusts the > weights as you change height so different layers fade in at different > heights. > > Robert. > > On Tue, Mar 4, 2008 at 12:39 PM, Joakim Simonsson <[EMAIL PROTECTED]> > wrote: >> >> Hello all OSGers! >> >> I have two simple questions. >> >> >> Question 1: >> >> I have two texture layers, L0 and L1 >> >> What is the best way in OSG to crossfade between these? >> >> What I want is: L0 * (a) + L1 * (1 - a) >> >> I think it must be either osg::TexEnv or osg::TexEnvCombine. But how >> should they be setup? >> >> >> >> Question 2: >> Is it more efficient to do this operation in a shader? >> >> >> -- >> Joakim Simonsson >> _______________________________________________ >> 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 -- Joakim Simonsson _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

