Hi Thomas et. al, I won't have a chance to complete the shader composition functionality in the near term so an improved ShaderGen would be welcome.
Handling items like lights, texgen and clipplanes will require some handling elsewhere other than with just the standard functionality - we'll need to have the osg::Light, osg::TexGen and osg::ClipPlane all be written as appropriate osg_* uniforms with the values being passed to OpenGL using the current modelview matrix as is done by OpenGL with the fixed function pipeline. This might require amendments to osg::State/osgUtil::RenderStage and the osg::Light, osg::TexGen and osg::ClipPlane, but it might also be possible with just amendments to state attributes if they do a little compute work prior to passing their values to OpenGL as uniforms. I would suggest finding a workable solution for lights then when this works roll it out for the other positional state. Thoughts? Robert. On 23 April 2012 15:16, Thomas Hogarth <[email protected]> wrote: > Yes I have a GLES2 version of shader gen. At the moment it only supports a > fixed hardcoded light position, which isn't great but it does support, > texturing, lighting etc. > > I've attached it and we can look at including into core osg, but I think > support for at least the initial position of one light source would be good. > Also we need to either test for backward compatibility with GL2 or have two > versions of ShaderGen in the core. > > I know Roberts long term goal is to introduce a Shader Composer system (bits > and pieces already exist), but this can work as an aid to new developers > until then. > > Let me know how you get on with it. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

