HI Alexandre,

There is no automagic thing to do what you are asking for.
Why are you insisting on not adding an osg::Program here?
Right now Robert is doing some work on a shader composition like approach, which might do the Program-injection automatically, but for now the preferred way to achieve what you are looking for would be the use of a visitor. The visitor in question would handle the nodes/Statesets with the properties you are describing (having 3 textures bound) and add an appropriate State / osg::Program. As for fixed function bump mapping there are some extensions, but they are really old and de-facto outdated.

Shaders are the way to go here.


Cheers
Sebastian
Hi All,

I'm not too knowledgeable in the field of shaders and bump map, but lately I've had the task of fixing something related to it in our software.

The issue is that some faces in our software are bumpmapped (I see the 3 different texture units used in the .osg file, as well as in the original .flt model), but the node itself does not seem to have an osg::Program (nor osg::VertexProgram or osg::FragmentProgram) part of its stateset's state attributes.

The question is this: is it possible that there is a way that a chunk of code of OSG could set up bump mapping on a node by itsefl and NOT add an osg::Program to it? For instance, if it finds more than one texture units in the .osg file, it would find a way to add a shader to enable the bump maping..?

I'm really wondering how that node could be bump mapped...

Thanks

--
Alexandre Vaillancourt


_______________________________________________
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