From Maciej Krol, "As promised to Roland I assembled simple shader generator. ShaderGenVisitor? converts accumulated fixed function pipeline state sets to ones with shader programs. Generated state sets are attached to geometries and stored in ShaderGenCache? for reuse.
Very simple cases of state configuration are supported (all the ones I really need):
- single per pixel not attenuated non spot light source ON/OFF
- exp2 fog ON/OFF
- diffuse texture in rgb + optional specular gloss in alpha (Texture unit 0) ON/OFF
- normal map texture (Texture unit 1 and Tangent in VertexAttribArray? 6) ON/OFF
- blending and alpha testing (not in shader pipeline)
To view fixed function pipeline files and paged databases simply run >osgshadergen myfile.osg"