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

Reply via email to