Hi All,

I have now checked in core OSG support for a new form of shader composition
that leverages #pragma's to extended GLSL shaders to specify which
#define's that it requires from the scene graph. The scene graph passes
these to the shaders via StateSet::setDefine(..) and provides full support
for the OSG's state override/protected options.

I have modified the osgshadercomposition example to illustrate a very
simple example that utlizes three shaders checked into
OpenSceneGraph-Data/shaders trunk.  So on the code look for
OpenSceneGraph/examples/osgshadercomposition.cpp and on the shader from
look at OpenSceneGraph-Data/shaders/osgshadercompostion.vert,
osgshadercomposition.frag and lighting.vert.

I will write more later about how to use this new capability.  It's gotta
be one of the coolest features added to the OSG for quite a few years :-)

Cheers,
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to