[osg-users] [Depth Buffer rendering]

Jean-Sébastien Guay jean-sebastien.guay at cm-labs.com
Fri Jun 13 09:01:29 PDT 2008


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    jean-sebastien.guay at cm-labs.com
                                http://www.cm-labs.com/
                         http://whitestar02.webhop.org/


More information about the osg-users mailing list