Hi Kim,

This is actually one of the problems that I tried to address with the half finished DynamicShader class in amongst the code.
I came to the conclusion that it might be better to have a huge uber shader and 
block out bits effects code with #defines or add constant variables such as the 
light id using the same method.

I really think we need to work out an architecture in OSG to be able to manage either shader composition from several snippets, or uber shader parametrization through #defines. Then OSG could define variables (or use different shader snippets) depending on the GL and GLSL version and available extensions, and we could write shaders that would work on many levels of different hardware.

I really should make a separate topic about this, but I think it's such a basic functionality that all programs using shaders will need, that OSG should offer some automation or framework for this kind of thing. Especially if we're going to move to OpenGL 3.0 where shaders are mandatory.

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to