Hi Nickolai,

In case you're really after the ModelMatrix you need to use the osg_ViewMatrixInverse and multiply it with your current osg_ModelViewMatrix.

As Robert already mentioned you need to set the osg::State::setUseModelViewAndProjectionUniforms(true) in order to make this work.

Cheers
Sebastian

Hi,

I need a matrix for the transform from root scene node to the node where the 
mesh the shaders currently are operating on is in.

Does OSG pass such a matrix automatically to the shaders?
If yes, is there other uniforms passed and is there a list of them somewhere?

Sorry if my question is dumb, I am new to shaders.

Thank you!

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72103#72103





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to