Hi All,

I'm trying to set a some textures on a surface using multitexturing:

Stage 0 ( Texture Base ) using REPLACE
Stage 1 ( Texture with or without ALPHA ) using DECAL
Stage 2 ( Texture with or without ALPHA ) using DECAL..


All works correctly using this configuration but now I need to set a certain level of opacity to the stages 1 or 2.
I'm trying to use osg::TexEnv.. but with DECAL the setColor property is ignored and with BLEND mode works fine for colored pixels
but not for alpha pixels that makes transparent the geometry.. and I want to show the base texture...

Basically I want to do something like:

Stage 0 (Texture Base) using REPLACE (always visible except in parts where high stages does not have translucency)
Stage 1 (Textures with or without ALPHA and opacity 0.5) (on alpha 0 pixels is shown texture base on colored parts we blend to a opacity of 0.5)
Stage 2 ....

What modes can I use for do that? I'm not too much experimented with TexEnvCombine.. but I cannot set a color
(with alpha) in this state attributte and I do not know how to use it correctly. 
It is possible to do that with fixed functionality or maybe I need to use a shader?.

If not is possible there is any easy way to set desired alpha to an image?

Any suggestion???

Maybe is easy.. but I'm not too much experimented in multitexturing...

Thanks in advance.

Rafa.

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to