Hello Mike,
So I've been prodding around a bit in the osgFX::BumpMapping code and noticed
that vertex and fragment shader programs are embedded in BumpMapping.cpp. I'm
guessing the TexMat ceases to do anything because the shader programs ignore
it? Is there any way to bypass that without writing my own shaders?
The texture matrix still applies when using shaders, it's just that some
shaders ignore it. In short, if you have a line like this in the vertex
shader:
gl_TexCoord[0] = gl_MultiTexCoord0;
then you have to replace it by:
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
So what you could do is copy the whole shaders from the source files of
osgFX::BumpMapping, just fix those lines and apply it to the same nodes.
Hopefully once Robert is done with shader composition, we'll have less
non-overridable shader code lying around everywhere. It should be easier
for users to override just parts of the shaders to fix things like this.
Hope this helps,
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