[osg-users] [osg-submissions] Fixed Function Pipeline to GLSL generator

Maciej Krol mackrol at gmail.com
Thu Mar 5 02:54:27 PST 2009


Hi Robert, Roland, all,

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

Robert, maybe it can be added to examples. It is half baked but useful
anyway.

Regards,
Maciej Krol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090305/35a320c0/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ShaderGen.zip
Type: application/zip
Size: 9376 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090305/35a320c0/attachment-0002.zip>


More information about the osg-users mailing list