The effect uses multi-texturing to blend the spot light texture with the base texture of the object, if you set the effect to texture unit 0 then you'll just replace the objects own texture which clearly would be be not the right thing to do for this type of effect.
Robert.
On 9/10/06, Yigang Wang <[EMAIL PROTECTED]> wrote:
Hi, all,I just test the spotlight example. I found there is some strange thing. When I changed the textureUnit from 1 to 0, the effect is not correct. Who know why it happen?The following is what I just changed.createSpotLightDecoratorState(0,1) ---> createSpotLightDecoratorState(0,0)createSpotLightNode(osg::Vec3(0.0f,0.0f,0.0f), osg::Vec3(0.0f,1.0f,-1.0f), 60.0f, 0, 1) -> createSpotLightNode(osg::Vec3(0.0f,0.0f,0.0f), osg::Vec3(0.0f,1.0f,-1.0f), 60.0f, 0, 0).Why the textureUnit 1 must be used?Thanks for your reply.Yigang
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
