Hello Mathieu,

In fact i've got a new problem (perhaps it's normal), the transformations applied with texgen are not take into account when i use my shader. Do you have any idea of how to proceed ? I attach a screen capture of my problem.

If you're using a vertex shader, you must do the TexGen yourself (because osg::TexGen is fixed vertex pipeline functionality, which is completely replaced by your vertex shader if you use one).

See the orange book for how to replicate the fixed pipeline OpenGL TexGen modes. Also, 3DLabs ShaderGen can generate shaders that replicate the fixed pipeline - see http://www.mew.cx/glsl/shadergen/. You might have to change the generated shaders to match your ways of doing things, and it's often not very useful to generate shaders that replicate ALL of OpenGL's fixed pipeline, but you can at least get inspiration / snippets from that tool.

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

Reply via email to