You could implement the full fixed function pipeline (the parts you
need) in a custom shader with the addition of manually controlling
transparency based on a uniform. Actually, a fragment shader may be all
you need... which is probably a lot easier than a fixed function pixel
shader.
I've been tempted to do this before myself as fading in/out a model for
LOD or otherwise is a real pain.
-Paul
Vincent Bourdier wrote:
Hi Robert,
I am aware of the mess this is to implement... but I need it, and I
cannot create my scene graph appropriately because it it generated by
some exporter (osgExp) so I have to work with graphs I cannot control.
I just was asking if there is an other solution I didn't tried, but I
see there are no miracles, I need to dig into the issue more longer to
make the better code I can.
Thanks for help.
Regards,
Vincent.
2009/6/9 Robert Osfield <[email protected]
<mailto:[email protected]>>
Hi Vincent,
On Tue, Jun 9, 2009 at 7:17 AM, Vincent
Bourdier<[email protected]
<mailto:[email protected]>> wrote:
> Can't it be interesting for OSG to have a setTransparency()
method on a node
> ? using material or something else, but working in each case...
The OSG's state handling is done with StateSet, you can multiple
parent paths to allow you to decorate the subgraphs with different
state.
Trying to embed low state management like transparency in nodes would
be an utter mess to implement and to maintain for developers and end
users. Just create your scene graph appropriately and you will be
able to do what you require without any modifications to the scene
graph.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
<mailto:[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
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org